public class Shapes
extends java.lang.Object
The Shapes class hold all object that are parsed from a Page's content streams. These contained object make up a pages graphics stack which can be iterated through to paint a page's content.
This class is generally only used by the Content parser during content parsing. The class also stores points to the images found in the content as well as the text that is encoded on a page.
| Modifier and Type | Field and Description |
|---|---|
protected OptionalContentState |
optionalContentState |
protected boolean |
paintAlpha |
protected java.util.ArrayList<DrawCmd> |
shapes |
| Constructor and Description |
|---|
Shapes() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(java.util.ArrayList<DrawCmd> shapes) |
void |
add(DrawCmd drawCmd) |
void |
contract()
Contracts the shapes ArrayList to the actual size of the elements
it contains.
|
float |
getAlpha() |
java.util.ArrayList<java.awt.Image> |
getImages()
Iterates over the Shapes objects extracting all Image objects.
|
PageText |
getPageText() |
int |
getRule() |
java.util.ArrayList<DrawCmd> |
getShapes() |
int |
getShapesCount()
Gets the number of shapes on the shapes stack.
|
void |
interruptPaint() |
boolean |
isInterrupted() |
boolean |
isPaintAlpha() |
void |
paint(java.awt.Graphics2D g)
Paint the graphics stack to the graphics context
|
void |
setAlpha(float alpha) |
void |
setPageParent(Page parent) |
void |
setPaintAlpha(boolean paintAlpha) |
void |
setRule(int rule) |
protected boolean paintAlpha
protected java.util.ArrayList<DrawCmd> shapes
protected OptionalContentState optionalContentState
public PageText getPageText()
public int getShapesCount()
public java.util.ArrayList<DrawCmd> getShapes()
public void add(java.util.ArrayList<DrawCmd> shapes)
public void setPageParent(Page parent)
public void add(DrawCmd drawCmd)
public boolean isPaintAlpha()
public void setPaintAlpha(boolean paintAlpha)
public void paint(java.awt.Graphics2D g)
g - graphics context to paint to.public void interruptPaint()
public boolean isInterrupted()
public java.util.ArrayList<java.awt.Image> getImages()
public void contract()
public int getRule()
public void setRule(int rule)
public float getAlpha()
public void setAlpha(float alpha)