+ if (m_bounds.Intersects(Rect(-1,-1,1,1)))
+ {
+ m_bounds = Rect(m_bounds.x - 1, m_bounds.y - 1, m_bounds.w, m_bounds.h);
+ m_bounds_dirty = true;
+ RenderQuadtreeNode(width, height, m_document.GetQuadTree().GetNeighbour(node, -1, -1), remaining_depth - 1);
+ }
+ if (m_bounds.Intersects(Rect(-1,0,1,1)))
+ {
+ m_bounds = Rect(m_bounds.x - 1, m_bounds.y, m_bounds.w, m_bounds.h);
+ m_bounds_dirty = true;
+ RenderQuadtreeNode(width, height, m_document.GetQuadTree().GetNeighbour(node, -1, 0), remaining_depth - 1);
+ }
+ if (m_bounds.Intersects(Rect(-1,1,1,1)))
+ {
+ m_bounds = Rect(m_bounds.x - 1, m_bounds.y + 1, m_bounds.w, m_bounds.h);
+ m_bounds_dirty = true;
+ RenderQuadtreeNode(width, height, m_document.GetQuadTree().GetNeighbour(node, -1, 1), remaining_depth - 1);
+ }
+ if (m_bounds.Intersects(Rect(0,-1,1,1)))
+ {
+ m_bounds = Rect(m_bounds.x, m_bounds.y - 1, m_bounds.w, m_bounds.h);
+ m_bounds_dirty = true;
+ RenderQuadtreeNode(width, height, m_document.GetQuadTree().GetNeighbour(node, 0, -1), remaining_depth - 1);
+ }
+ if (m_bounds.Intersects(Rect(0,1,1,1)))
+ {
+ m_bounds = Rect(m_bounds.x, m_bounds.y + 1, m_bounds.w, m_bounds.h);
+ m_bounds_dirty = true;
+ RenderQuadtreeNode(width, height, m_document.GetQuadTree().GetNeighbour(node, 0, 1), remaining_depth - 1);
+ }
+ if (m_bounds.Intersects(Rect(1,-1,1,1)))
+ {
+ m_bounds = Rect(m_bounds.x + 1, m_bounds.y - 1, m_bounds.w, m_bounds.h);
+ m_bounds_dirty = true;
+ RenderQuadtreeNode(width, height, m_document.GetQuadTree().GetNeighbour(node, 1, -1), remaining_depth - 1);
+ }
+ if (m_bounds.Intersects(Rect(1,0,1,1)))
+ {
+ m_bounds = Rect(m_bounds.x + 1, m_bounds.y, m_bounds.w, m_bounds.h);
+ m_bounds_dirty = true;
+ RenderQuadtreeNode(width, height, m_document.GetQuadTree().GetNeighbour(node, 1, 0), remaining_depth - 1);
+ }
+ if (m_bounds.Intersects(Rect(1,1,1,1)))
+ {
+ m_bounds = Rect(m_bounds.x + 1, m_bounds.y + 1, m_bounds.w, m_bounds.h);
+ m_bounds_dirty = true;
+ RenderQuadtreeNode(width, height, m_document.GetQuadTree().GetNeighbour(node, 1, 1), remaining_depth - 1);
+ }
+ m_bounds = old_bounds;
+ m_bounds_dirty = true;
+
+#if 0