net.nexttext.renderer
Class BoundingBoxRenderer

java.lang.Object
  extended by net.nexttext.renderer.TextPageRenderer
      extended by 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 net.nexttext.renderer.TextPageRenderer
getPApplet
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BoundingBoxRenderer

public BoundingBoxRenderer(processing.core.PApplet p,
                           int boxColor,
                           boolean doGlyphs,
                           boolean doGroups)
Builds a BoundingBoxRenderer.

Parameters:
p - the parent PApplet
boxColor - the color that will be used to render the boxes
doGlyphs - whether or not to draw bounding boxes around the TextObjectGlyphs
doGroups - 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 PApplet
rColor - the red value of the color that will be used to render the boxes
gColor - the green value of the color that will be used to render the boxes
bColor - the blue value of the color that will be used to render the boxes
doGlyphs - whether or not to draw bounding boxes around the TextObjectGlyphs
doGroups - whether or not to draw bounding boxes around the TextObjectGroups
Method Detail

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