|
intarsys PDF library API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.intarsys.pdf.content.CSDeviceAdapter
de.intarsys.pdf.content.CSShapeDevice
de.intarsys.pdf.content.common.CSBoundingBoxCollector
public class CSBoundingBoxCollector
Determine the bounding box of the content streams graphic primitives.
Usage
CSBoundingBoxCollector bbCollector = new CSBoundingBoxCollector();
CSDeviceBasedInterpreter interpreter = new CSDeviceBasedInterpreter(null, bbCollector);
interpreter.process(content, getResources());
if (bbCollector.getBoundingBox() != null) {
...
}
CSBoundingBoxCollector
does not take care of text yet !!
Field Summary |
---|
Fields inherited from class de.intarsys.pdf.content.CSDeviceAdapter |
---|
MAX_STACK_SIZE |
Constructor Summary | |
---|---|
CSBoundingBoxCollector()
|
Method Summary | |
---|---|
Rectangle2D |
getBoundingBox()
The bounding box containing all graphics artifacts stemming from operations in the content stream processed. |
void |
open(ICSInterpreter pInterpreter)
Open the device for use by interpreter . |
void |
restoreState()
Restore the graphics state from the stack. |
void |
saveState()
Save the current graphics state on a stack for later use. |
void |
transform(float a,
float b,
float c,
float d,
float e,
float f)
Modify the current transformation matrix by concatenating the transformations. |
Methods inherited from class de.intarsys.pdf.content.CSShapeDevice |
---|
pathClipEvenOdd, pathClipNonZero, pathClose, pathCloseFillStrokeEvenOdd, pathCloseFillStrokeNonZero, pathCloseStroke, pathEnd, pathFillEvenOdd, pathFillNonZero, pathFillStrokeEvenOdd, pathFillStrokeNonZero, pathStroke, penCurveToC, penCurveToV, penCurveToY, penLineTo, penMoveTo, penRectangle |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CSBoundingBoxCollector()
Method Detail |
---|
public Rectangle2D getBoundingBox()
public void open(ICSInterpreter pInterpreter)
ICSDevice
interpreter
.
open
in interface ICSDevice
open
in class CSDeviceAdapter
public void saveState()
ICSDevice
PDF graphics operator "q"
saveState
in interface ICSDevice
saveState
in class CSDeviceAdapter
public void restoreState()
ICSDevice
PDF graphics operator "Q"
restoreState
in interface ICSDevice
restoreState
in class CSDeviceAdapter
public void transform(float a, float b, float c, float d, float e, float f)
ICSDevice
PDF graphics operator "cm"
transform
in interface ICSDevice
transform
in class CSDeviceAdapter
a
- operand 1,1 in the matrixb
- operand 1,2 in the matrixc
- operand 2,1 in the matrixd
- operand 2,2 in the matrixe
- operand 3,1 in the matrixf
- operand 3,2 in the matrix
|
intarsys PDF library API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |