Class ParserGraphicsState
java.lang.Object
com.itextpdf.kernel.pdf.canvas.CanvasGraphicsState
com.itextpdf.kernel.pdf.canvas.parser.ParserGraphicsState
Internal class which is essentially a
CanvasGraphicsState which supports tracking of
clipping path state and changes.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionInternal empty and default constructor.Copy constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidIntersects the current clipping path with the given path.Getter for the current clipping path.voidsetClippingPath(Path clippingPath) Sets the current clipping path to the specified path.private voidtransformClippingPath(Matrix newCtm) voidUpdates current transformation matrix.Methods inherited from class CanvasGraphicsState
getAlphaIsShape, getAutomaticStrokeAdjustment, getBlackGenerationFunction, getBlackGenerationFunction2, getBlendMode, getCharSpacing, getCtm, getDashPattern, getFillColor, getFillOpacity, getFillOverprint, getFlatnessTolerance, getFont, getFontSize, getHalftone, getHorizontalScaling, getHTP, getLeading, getLineCapStyle, getLineJoinStyle, getLineWidth, getMiterLimit, getOverprintMode, getRenderingIntent, getSmoothnessTolerance, getSoftMask, getStrokeColor, getStrokeOpacity, getStrokeOverprint, getTextKnockout, getTextRenderingMode, getTextRise, getTransferFunction, getTransferFunction2, getUnderColorRemovalFunction, getUnderColorRemovalFunction2, getWordSpacing, setCharSpacing, setDashPattern, setFillColor, setFlatnessTolerance, setFont, setFontSize, setHorizontalScaling, setLeading, setLineCapStyle, setLineJoinStyle, setLineWidth, setMiterLimit, setRenderingIntent, setStrokeColor, setTextRenderingMode, setTextRise, setWordSpacing, updateCtm, updateFromExtGState, updateFromExtGState
-
Field Details
-
clippingPath
-
-
Constructor Details
-
ParserGraphicsState
ParserGraphicsState()Internal empty and default constructor. -
ParserGraphicsState
ParserGraphicsState(ParserGraphicsState source) Copy constructor.- Parameters:
source- the Graphics State to copy from
-
-
Method Details
-
updateCtm
Description copied from class:CanvasGraphicsStateUpdates current transformation matrix.- Overrides:
updateCtmin classCanvasGraphicsState- Parameters:
newCtm- new current transformation matrix.
-
clip
Intersects the current clipping path with the given path.Note: Coordinates of the given path should be in the transformed user space.
- Parameters:
path- The path to be intersected with the current clipping path.fillingRule- The filling rule which should be applied to the given path. It should be eitherPdfCanvasConstants.FillingRule.EVEN_ODDorPdfCanvasConstants.FillingRule.NONZERO_WINDING
-
getClippingPath
Getter for the current clipping path.Note: The returned clipping path is in the transformed user space, so if you want to get it in default user space, apply transformation matrix (
CanvasGraphicsState.getCtm()).- Returns:
- The current clipping path.
-
setClippingPath
Sets the current clipping path to the specified path.Note:This method doesn't modify existing clipping path, it simply replaces it with the new one instead.
- Parameters:
clippingPath- New clipping path.
-
transformClippingPath
-