jPod PDF library

de.intarsys.pdf.content.common
Class CSBoundingBoxCollector

java.lang.Object
  extended by de.intarsys.pdf.content.CSDeviceAdapter
      extended by de.intarsys.pdf.content.CSBasicDevice
          extended by 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 !!


Field Summary
 
Fields inherited from class de.intarsys.pdf.content.CSBasicDevice
THOUSAND
 
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.
 
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
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CSBoundingBoxCollector

public CSBoundingBoxCollector()
Method Detail

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.

jPod PDF library

Copyright © 2008 intarsys consulting GmbH. All Rights Reserved.