public class ParserGraphicsState extends CanvasGraphicsState
CanvasGraphicsState which supports tracking of
clipping path state and changes.| Modifier and Type | Method and Description |
|---|---|
void |
clip(Path path,
int fillingRule)
Intersects the current clipping path with the given path.
|
Path |
getClippingPath()
Getter for the current clipping path.
|
void |
setClippingPath(Path clippingPath)
Sets the current clipping path to the specified path.
|
void |
updateCtm(Matrix newCtm)
Updates current transformation matrix.
|
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, updateFromExtGStatepublic void updateCtm(Matrix newCtm)
CanvasGraphicsStateupdateCtm in class CanvasGraphicsStatenewCtm - new current transformation matrix.public void clip(Path path, int fillingRule)
Note: Coordinates of the given path should be in the transformed user space.
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 either PdfCanvasConstants.FillingRule.EVEN_ODD or
PdfCanvasConstants.FillingRule.NONZERO_WINDINGpublic Path getClippingPath()
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()).
public void setClippingPath(Path clippingPath)
Note:This method doesn't modify existing clipping path, it simply replaces it with the new one instead.
clippingPath - New clipping path.Copyright © 1998–2024 Apryse Group NV. All rights reserved.