net.nexttext.renderer
Class BoundingBoxRenderer
java.lang.Object
net.nexttext.renderer.TextPageRenderer
net.nexttext.renderer.BoundingBoxRenderer
public class BoundingBoxRenderer
- extends TextPageRenderer
Traverses the TextObject hierarchy and draws every object's bounding box.
Constructor Summary |
BoundingBoxRenderer(processing.core.PApplet p,
int boxColor,
boolean doGlyphs,
boolean doGroups)
Builds a BoundingBoxRenderer. |
BoundingBoxRenderer(processing.core.PApplet p,
int rColor,
int gColor,
int bColor,
boolean doGlyphs,
boolean doGroups)
Builds a BoundingBoxRenderer. |
Method Summary |
void |
renderPage(TextPage textPage)
Traverse the TextObject tree and render all of its elements. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BoundingBoxRenderer
public BoundingBoxRenderer(processing.core.PApplet p,
int boxColor,
boolean doGlyphs,
boolean doGroups)
- Builds a BoundingBoxRenderer.
- Parameters:
p
- the parent PAppletboxColor
- the color that will be used to render the boxesdoGlyphs
- whether or not to draw bounding boxes around the TextObjectGlyphsdoGroups
- whether or not to draw bounding boxes around the TextObjectGroups
BoundingBoxRenderer
public BoundingBoxRenderer(processing.core.PApplet p,
int rColor,
int gColor,
int bColor,
boolean doGlyphs,
boolean doGroups)
- Builds a BoundingBoxRenderer.
- Parameters:
p
- the parent PAppletrColor
- the red value of the color that will be used to render the boxesgColor
- the green value of the color that will be used to render the boxesbColor
- the blue value of the color that will be used to render the boxesdoGlyphs
- whether or not to draw bounding boxes around the TextObjectGlyphsdoGroups
- whether or not to draw bounding boxes around the TextObjectGroups
renderPage
public void renderPage(TextPage textPage)
- Traverse the TextObject tree and render all of its elements.
- Specified by:
renderPage
in class TextPageRenderer
- Parameters:
textPage
- the TextPage to render