|
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)
ICSDeviceinterpreter.
open in interface ICSDeviceopen in class CSDeviceAdapterpublic void saveState()
ICSDevicePDF graphics operator "q"
saveState in interface ICSDevicesaveState in class CSDeviceAdapterpublic void restoreState()
ICSDevicePDF graphics operator "Q"
restoreState in interface ICSDevicerestoreState in class CSDeviceAdapter
public void transform(float a,
float b,
float c,
float d,
float e,
float f)
ICSDevicePDF graphics operator "cm"
transform in interface ICSDevicetransform in class CSDeviceAdaptera - 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 | |||||||||