endrov.windowLineage
Class HierarchicalPainter
java.lang.Object
endrov.windowLineage.HierarchicalPainter
public class HierarchicalPainter
- extends java.lang.Object
Hierarchical 2D rendering system. When drawing really large charts that do not
fit within the screen, the most important optimization is culling of objects that
are outside the screen. This class does it by storing objects in a tree such that
a sub-object is within the bounding box of the parent. This logarithmically reduces
the number of objects that has to be considered for rendering.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
topNodes
public java.util.List<HierarchicalPainter.DrawNode> topNodes
HierarchicalPainter
public HierarchicalPainter()
getTotalBoundingBox
public HierarchicalPainter.BoundingBox getTotalBoundingBox()
- Get a bounding box around all objects, or null if there are no objects
paint
public void paint(java.awt.Graphics g,
double width,
double height,
HierarchicalPainter.Camera cam)
- Paint everything
- Parameters:
width
- Width of output gheight
- Height of output gcam
- Camera
paint_
public int paint_(java.awt.Graphics g,
double width,
double height,
HierarchicalPainter.Camera cam,
HierarchicalPainter.BoundingBox screenBB,
HierarchicalPainter.DrawNode n)