de.intarsys.pdf.content.common
Class CSBoundingBoxCollector
java.lang.Object
de.intarsys.pdf.content.CSDeviceAdapter
de.intarsys.pdf.content.CSBasicDevice
de.intarsys.pdf.content.common.CSBoundingBoxCollector
- All Implemented Interfaces:
- ICSDevice, ICSDeviceFeatures
public class CSBoundingBoxCollector
- extends CSBasicDevice
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) {
...
}
ATTENTION: The CSBoundingBoxCollector
does not take care of text yet !!
Method Summary |
Rectangle2D |
getBoundingBox()
The bounding box containing all graphics artifacts stemming from
operations in the content stream processed. |
Methods inherited from class de.intarsys.pdf.content.CSBasicDevice |
open, pathClipEvenOdd, pathClipNonZero, pathClose, pathCloseFillStrokeEvenOdd, pathCloseFillStrokeNonZero, pathCloseStroke, pathEnd, pathFillEvenOdd, pathFillNonZero, pathFillStrokeEvenOdd, pathFillStrokeNonZero, pathStroke, penCurveToC, penCurveToV, penCurveToY, penLineTo, penMoveTo, penRectangle, textShow |
Methods inherited from class de.intarsys.pdf.content.CSDeviceAdapter |
close, compatibilityBegin, compatibilityEnd, doShading, doXObject, getDeviceTransform, getGraphicsState, getInterpreter, inlineImage, markedContentBegin, markedContentBeginProperties, markedContentEnd, markedContentPoint, markedContentPointProperties, restoreState, saveState, setDeviceTransform, setExtendedState, setFlatnessTolerance, setLineCap, setLineDash, setLineJoin, setLineWidth, setMiterLimit, setNonStrokeColorCMYK, setNonStrokeColorGray, setNonStrokeColorRGB, setNonStrokeColorSpace, setNonStrokeColorValues, setNonStrokeColorValues, setRenderingIntent, setStrokeColorCMYK, setStrokeColorGray, setStrokeColorRGB, setStrokeColorSpace, setStrokeColorValues, setStrokeColorValues, supportsColorSpace, supportsExtendedState, supportsFont, supportsInlineImage, supportsPattern, supportsProperties, supportsShading, supportsXObject, textBegin, textEnd, textLineMove, textLineNew, textMove, textMoveTo, textSetCharSpacing, textSetFont, textSetHorizontalScaling, textSetLeading, textSetRenderingMode, textSetRise, textSetTransform, textSetWordSpacing, textShow, textShow, textT3SetGlyphWidth, textT3SetGlyphWidthBB, transform |
CSBoundingBoxCollector
public CSBoundingBoxCollector()
getBoundingBox
public Rectangle2D getBoundingBox()
- The bounding box containing all graphics artifacts stemming from
operations in the content stream processed.
The result may be null
.
- Returns:
- The bounding box containing all graphics artifacts stemming from
operations in the content stream processed.
Copyright © 2008 intarsys consulting GmbH. All Rights Reserved.