Package com.itextpdf.kernel.pdf.canvas
Class CanvasGraphicsState
- java.lang.Object
-
- com.itextpdf.kernel.pdf.canvas.CanvasGraphicsState
-
- Direct Known Subclasses:
ParserGraphicsState
,PdfA2Checker.UpdateCanvasGraphicsState
public class CanvasGraphicsState extends java.lang.Object
This class is designed for internal usage.
UsePdfExtGState
class andPdfCanvas#setExtGState()
method for setting extended graphics properties.
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
alphaIsShape
private boolean
automaticStrokeAdjustment
private PdfObject
blackGenerationFunction
private PdfObject
blackGenerationFunction2
private PdfObject
blendMode
private float
charSpacing
private Matrix
ctm
The current transformation matrix, which maps positions from user coordinates to device coordinates.private PdfArray
dashPattern
A description of the dash pattern to be used when paths are stroked.private float
fillAlpha
private Color
fillColor
private boolean
fillOverprint
private float
flatnessTolerance
private PdfFont
font
private float
fontSize
private PdfObject
halftone
private PdfObject
htp
private float
leading
private int
lineCapStyle
private int
lineJoinStyle
private float
lineWidth
private float
miterLimit
private int
overprintMode
private PdfName
renderingIntent
private float
scale
private java.lang.Float
smoothnessTolerance
private PdfObject
softMask
private float
strokeAlpha
private Color
strokeColor
private boolean
strokeOverprint
private boolean
textKnockout
private int
textRenderingMode
private float
textRise
private PdfObject
transferFunction
private PdfObject
transferFunction2
private PdfObject
underColorRemovalFunction
private PdfObject
underColorRemovalFunction2
private float
wordSpacing
-
Constructor Summary
Constructors Modifier Constructor Description protected
CanvasGraphicsState()
Internal empty and default constructor.CanvasGraphicsState(CanvasGraphicsState source)
Copy constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
copyFrom(CanvasGraphicsState source)
boolean
getAlphaIsShape()
Gets the current Alpha is shape flag, see ISO 32000-1, 11.3.7.2 Source Shape and Opacity and 11.6.4.3 Mask Shape and Opacity,PdfExtGState.getAlphaSourceFlag()
.boolean
getAutomaticStrokeAdjustment()
Gets the current Apply Automatic Stroke Adjustment flag, see ISO 32000-1, 10.6.5 Automatic Stroke Adjustment,PdfExtGState.getAutomaticStrokeAdjustmentFlag()
.PdfObject
getBlackGenerationFunction()
Gets the current Black-generation function, see ISO32000-1, 11.7.5.3 Rendering Intent and Colour Conversions and Table 58 – Entries in a Graphics State Parameter Dictionary,PdfExtGState.getBlackGenerationFunction()
.PdfObject
getBlackGenerationFunction2()
Gets the current overruling Black-generation function, see ISO32000-1, 11.7.5.3 Rendering Intent and Colour Conversions and Table 58 – Entries in a Graphics State Parameter Dictionary,PdfExtGState.getBlackGenerationFunction2()
.PdfObject
getBlendMode()
Gets the current Blend Mode, see ISO 32000-1, 11.3.5 Blend Mode and 11.6.3 Specifying Blending Colour Space and Blend Mode,PdfExtGState.getBlendMode()
.float
getCharSpacing()
Gets the current Character Spacing, see ISO-320001, 9.3.2 Character Spacing,PdfCanvas.setCharacterSpacing(float)
.Matrix
getCtm()
PdfArray
getDashPattern()
Gets line dash pattern value,D
key, see ISO-320001, 8.4.3.6 Line Dash Pattern,PdfExtGState.setDashPattern(com.itextpdf.kernel.pdf.PdfArray)
.Color
getFillColor()
Gets the current fill color.float
getFillOpacity()
Gets the current Fill Opacity value, see ISO 32000-1, 11.3.7.2 Source Shape and Opacity and 11.6.4.4 Constant Shape and Opacity,PdfExtGState.getFillOpacity()
.boolean
getFillOverprint()
Get the Fill Overprint flag, see ISO 32000-1, 8.6.7 Overprint Control and 11.7.4.5 Summary of Overprinting Behaviour,PdfExtGState.getFillOverprintFlag()
.float
getFlatnessTolerance()
Gets the current Flatness Tolerance, see ISO-320001, 10.6.2 Flatness Tolerance,PdfCanvas.setFlatnessTolerance(float)
.PdfFont
getFont()
Gets the currentPdfFont
.float
getFontSize()
Gets the font size.PdfObject
getHalftone()
Gets the current halftone , see ISO32000-1, 10.5 Halftones and Table 58 – Entries in a Graphics State Parameter Dictionary,PdfExtGState.getHalftone()
.float
getHorizontalScaling()
Gets the current Horizontal Scaling percentage, see ISO-320001, 9.3.4 Horizontal Scaling.PdfObject
getHTP()
Gets the current Halftone Phase, see Portable Document Format Reference Manual Version 1.2, 7.12 Extended graphics states and PostScript Language Reference Manual, Second Edition, 7.3.3, Halftone Phase.float
getLeading()
Gets the current Leading, see ISO-320001, 9.3.5 Leading,PdfCanvas.setLeading(float)
.int
getLineCapStyle()
Gets the current line cap style, see ISO-320001, 8.4.3.3 Line Cap Style.int
getLineJoinStyle()
Gets the current line join style, see ISO-320001, 8.4.3.4 Line Join Style.float
getLineWidth()
Gets the current line width.float
getMiterLimit()
Gets the current miter limit, see ISO-320001, 8.4.3.5 Miter Limit.int
getOverprintMode()
Get the Overprint Mode, see ISO 32000-1, 8.6.7 Overprint Control and 11.7.4.5 Summary of Overprinting Behaviour,PdfExtGState.getOverprintMode()
.PdfName
getRenderingIntent()
Gets the rendering intent, seePdfExtGState.getRenderingIntent()
.java.lang.Float
getSmoothnessTolerance()
Gets the current Smoothness Tolerance, see ISO32000-1, 10.6.3 Smoothness Tolerance and Table 58 – Entries in a Graphics State Parameter Dictionary,PdfExtGState.getSmothnessTolerance()
.PdfObject
getSoftMask()
Gets the current Soft Mask, see ISO 32000-1, 11.3.7.2 Source Shape and Opacity, 11.6.4.3 Mask Shape and Opacity and 11.6.5.2 Soft-Mask Dictionaries,PdfExtGState.getSoftMask()
.Color
getStrokeColor()
Gets the current stroke color.float
getStrokeOpacity()
Gets the current Stroke Opacity value, see ISO 32000-1, 11.3.7.2 Source Shape and Opacity and 11.6.4.4 Constant Shape and Opacity,PdfExtGState.getStrokeOpacity()
.boolean
getStrokeOverprint()
Get the Stroke Overprint flag, see ISO 32000-1, 8.6.7 Overprint Control and 11.7.4.5 Summary of Overprinting Behaviour,PdfExtGState.getStrokeOverprintFlag()
.boolean
getTextKnockout()
Gets the current Text Knockout flag, see ISO 32000-1, 9.3.8 Text Knockout,PdfExtGState.getTextKnockoutFlag()
.int
getTextRenderingMode()
Gets the current Text Rendering Mode, see ISO-320001, 9.3.6 Text Rendering Mode,PdfCanvas.setTextRenderingMode(int)
.float
getTextRise()
Get the current Text Rise, see ISO-320001, 9.3.7 Text Rise,PdfCanvas.setTextRise(float)
.PdfObject
getTransferFunction()
Gets the current Transfer function, see ISO32000-1, 11.7.5.3 Rendering Intent and Colour Conversions and Table 58 – Entries in a Graphics State Parameter Dictionary,PdfExtGState.getTransferFunction()
.PdfObject
getTransferFunction2()
Gets the current overruling transer function, see ISO32000-1, 11.7.5.3 Rendering Intent and Colour Conversions and Table 58 – Entries in a Graphics State Parameter Dictionary,PdfExtGState.getTransferFunction2()
.PdfObject
getUnderColorRemovalFunction()
Gets the current Undercolor-removal function, see ISO32000-1, 11.7.5.3 Rendering Intent and Colour Conversions and Table 58 – Entries in a Graphics State Parameter DictionaryPdfExtGState.getUndercolorRemovalFunction()
.PdfObject
getUnderColorRemovalFunction2()
Gets the current overruling Undercolor-removal function, see ISO32000-1, 11.7.5.3 Rendering Intent and Colour Conversions and Table 58 – Entries in a Graphics State Parameter Dictionary,PdfExtGState.getUndercolorRemovalFunction2()
.float
getWordSpacing()
Gets the current Word Spacing, see ISO-320001, 9.3.3 Word Spacing,PdfCanvas.setWordSpacing(float)
void
setCharSpacing(float characterSpacing)
Sets the Character Spacing, see ISO-320001, 9.3.2 Character Spacing,PdfCanvas.setCharacterSpacing(float)
void
setDashPattern(PdfArray dashPattern)
Sets line dash pattern value,D
key, see ISO-320001, 8.4.3.6 Line Dash Pattern,PdfExtGState.setDashPattern(com.itextpdf.kernel.pdf.PdfArray)
.void
setFillColor(Color fillColor)
Sets the current fillcolor
.void
setFlatnessTolerance(float flatnessTolerance)
Sets the current Flatness Tolerance, see ISO-320001, 10.6.2 Flatness Tolerance,PdfCanvas.setFlatnessTolerance(float)
.void
setFont(PdfFont font)
Sets the currentPdfFont
.void
setFontSize(float fontSize)
Sets the font size.void
setHorizontalScaling(float scale)
Sets the Horizontal Scaling percentage for text, see ISO-320001, 9.3.4 Horizontal Scaling,PdfCanvas.setHorizontalScaling(float)
.void
setLeading(float leading)
Sets the Leading, see ISO-320001, 9.3.5 Leading,PdfCanvas.setLeading(float)
.void
setLineCapStyle(int lineCapStyle)
Sets the current line cap style, see ISO-320001, 8.4.3.3 Line Cap Style.void
setLineJoinStyle(int lineJoinStyle)
Sets the current line join style, see ISO-320001, 8.4.3.4 Line Join Style.void
setLineWidth(float lineWidth)
Sets the current line width.void
setMiterLimit(float miterLimit)
Sets the current miter limit, see ISO-320001, 8.4.3.5 Miter Limit.void
setRenderingIntent(PdfName renderingIntent)
Sets the rendering intent, seePdfExtGState.getRenderingIntent()
.void
setStrokeColor(Color strokeColor)
Sets the current strokecolor
.void
setTextRenderingMode(int textRenderingMode)
Sets the current Text Rendering Mode, see ISO-320001, 9.3.6 Text Rendering Mode,PdfCanvas.setTextRenderingMode(int)
.void
setTextRise(float textRise)
Set the current Text Rise, see ISO-320001, 9.3.7 Text RisePdfCanvas.setTextRise(float)
.void
setWordSpacing(float wordSpacing)
Sets the Word Spacing, see ISO-320001, 9.3.3 Word Spacing,PdfCanvas.setWordSpacing(float)
.void
updateCtm(float a, float b, float c, float d, float e, float f)
Updates current transformation matrix.void
updateCtm(Matrix newCtm)
Updates current transformation matrix.void
updateFromExtGState(PdfExtGState extGState)
Updates current graphic state with values from extended graphic state dictionary.(package private) void
updateFromExtGState(PdfExtGState extGState, PdfDocument pdfDocument)
Updates current graphic state with values from extended graphic state dictionary.void
updateFromExtGState(PdfDictionary extGState)
Updates this object with the values from a dictionary.
-
-
-
Field Detail
-
ctm
private Matrix ctm
The current transformation matrix, which maps positions from user coordinates to device coordinates.We use an identity matrix as a default value, but in spec a default value is: "a matrix that transforms default user coordinates to device coordinates".
-
strokeColor
private Color strokeColor
-
fillColor
private Color fillColor
-
charSpacing
private float charSpacing
-
wordSpacing
private float wordSpacing
-
scale
private float scale
-
leading
private float leading
-
font
private PdfFont font
-
fontSize
private float fontSize
-
textRenderingMode
private int textRenderingMode
-
textRise
private float textRise
-
textKnockout
private boolean textKnockout
-
lineWidth
private float lineWidth
-
lineCapStyle
private int lineCapStyle
-
lineJoinStyle
private int lineJoinStyle
-
miterLimit
private float miterLimit
-
dashPattern
private PdfArray dashPattern
A description of the dash pattern to be used when paths are stroked. Default value is solid line.The line dash pattern is expressed as an array of the form [ dashArray dashPhase ], where dashArray is itself an array and dashPhase is an integer.
An empty dash array (first element in the array) and zero phase (second element in the array) can be used to restore the dash pattern to a solid line.
-
renderingIntent
private PdfName renderingIntent
-
automaticStrokeAdjustment
private boolean automaticStrokeAdjustment
-
blendMode
private PdfObject blendMode
-
softMask
private PdfObject softMask
-
strokeAlpha
private float strokeAlpha
-
fillAlpha
private float fillAlpha
-
alphaIsShape
private boolean alphaIsShape
-
strokeOverprint
private boolean strokeOverprint
-
fillOverprint
private boolean fillOverprint
-
overprintMode
private int overprintMode
-
blackGenerationFunction
private PdfObject blackGenerationFunction
-
blackGenerationFunction2
private PdfObject blackGenerationFunction2
-
underColorRemovalFunction
private PdfObject underColorRemovalFunction
-
underColorRemovalFunction2
private PdfObject underColorRemovalFunction2
-
transferFunction
private PdfObject transferFunction
-
transferFunction2
private PdfObject transferFunction2
-
halftone
private PdfObject halftone
-
flatnessTolerance
private float flatnessTolerance
-
smoothnessTolerance
private java.lang.Float smoothnessTolerance
-
htp
private PdfObject htp
-
-
Constructor Detail
-
CanvasGraphicsState
protected CanvasGraphicsState()
Internal empty and default constructor.
-
CanvasGraphicsState
public CanvasGraphicsState(CanvasGraphicsState source)
Copy constructor.- Parameters:
source
- the Graphics State to copy from
-
-
Method Detail
-
updateFromExtGState
public void updateFromExtGState(PdfDictionary extGState)
Updates this object with the values from a dictionary.- Parameters:
extGState
- the dictionary containing source parameters
-
getCtm
public Matrix getCtm()
- Returns:
- current transformation matrix.
-
updateCtm
public void updateCtm(float a, float b, float c, float d, float e, float f)
Updates current transformation matrix. The third column will always be [0 0 1]- Parameters:
a
- element at (1,1) of the transformation matrixb
- element at (1,2) of the transformation matrixc
- element at (2,1) of the transformation matrixd
- element at (2,2) of the transformation matrixe
- element at (3,1) of the transformation matrixf
- element at (3,2) of the transformation matrix
-
updateCtm
public void updateCtm(Matrix newCtm)
Updates current transformation matrix.- Parameters:
newCtm
- new current transformation matrix.
-
getFillColor
public Color getFillColor()
Gets the current fill color.- Returns:
- The canvas graphics state fill
color
-
setFillColor
public void setFillColor(Color fillColor)
Sets the current fillcolor
.- Parameters:
fillColor
- The new fill color.
-
getStrokeColor
public Color getStrokeColor()
Gets the current stroke color.- Returns:
- The canvas graphics state stroke
color
-
setStrokeColor
public void setStrokeColor(Color strokeColor)
Sets the current strokecolor
.- Parameters:
strokeColor
- The new stroke color.
-
getLineWidth
public float getLineWidth()
Gets the current line width.- Returns:
- The canvas graphics state line width.
-
setLineWidth
public void setLineWidth(float lineWidth)
Sets the current line width.- Parameters:
lineWidth
- The new line width.
-
getLineCapStyle
public int getLineCapStyle()
Gets the current line cap style, see ISO-320001, 8.4.3.3 Line Cap Style.- Returns:
- The current cap style.
- See Also:
for more info.
-
setLineCapStyle
public void setLineCapStyle(int lineCapStyle)
Sets the current line cap style, see ISO-320001, 8.4.3.3 Line Cap Style.- Parameters:
lineCapStyle
- The new cap style value.- See Also:
for more info.
-
getLineJoinStyle
public int getLineJoinStyle()
Gets the current line join style, see ISO-320001, 8.4.3.4 Line Join Style.- Returns:
- The current line join style.
- See Also:
for more info.
-
setLineJoinStyle
public void setLineJoinStyle(int lineJoinStyle)
Sets the current line join style, see ISO-320001, 8.4.3.4 Line Join Style.- Parameters:
lineJoinStyle
- The new line join style value.- See Also:
for more info.
-
getMiterLimit
public float getMiterLimit()
Gets the current miter limit, see ISO-320001, 8.4.3.5 Miter Limit.- Returns:
- The current miter limit.
- See Also:
for more info.
-
setMiterLimit
public void setMiterLimit(float miterLimit)
Sets the current miter limit, see ISO-320001, 8.4.3.5 Miter Limit.- Parameters:
miterLimit
- The new miter limit value.- See Also:
for more info.
-
getDashPattern
public PdfArray getDashPattern()
Gets line dash pattern value,D
key, see ISO-320001, 8.4.3.6 Line Dash Pattern,PdfExtGState.setDashPattern(com.itextpdf.kernel.pdf.PdfArray)
.- Returns:
- a
PdfArray
, that represents line dash pattern.
-
setDashPattern
public void setDashPattern(PdfArray dashPattern)
Sets line dash pattern value,D
key, see ISO-320001, 8.4.3.6 Line Dash Pattern,PdfExtGState.setDashPattern(com.itextpdf.kernel.pdf.PdfArray)
.- Parameters:
dashPattern
- aPdfArray
, that represents line dash pattern.
-
getRenderingIntent
public PdfName getRenderingIntent()
Gets the rendering intent, seePdfExtGState.getRenderingIntent()
.- Returns:
- the rendering intent name.
-
setRenderingIntent
public void setRenderingIntent(PdfName renderingIntent)
Sets the rendering intent, seePdfExtGState.getRenderingIntent()
.- Parameters:
renderingIntent
- the rendering intent name.
-
getFontSize
public float getFontSize()
Gets the font size.- Returns:
- The current font size.
-
setFontSize
public void setFontSize(float fontSize)
Sets the font size.- Parameters:
fontSize
- The new font size.
-
setFont
public void setFont(PdfFont font)
Sets the currentPdfFont
.- Parameters:
font
- The newPdfFont
.
-
getTextRenderingMode
public int getTextRenderingMode()
Gets the current Text Rendering Mode, see ISO-320001, 9.3.6 Text Rendering Mode,PdfCanvas.setTextRenderingMode(int)
.- Returns:
- The current text rendering mode.
-
setTextRenderingMode
public void setTextRenderingMode(int textRenderingMode)
Sets the current Text Rendering Mode, see ISO-320001, 9.3.6 Text Rendering Mode,PdfCanvas.setTextRenderingMode(int)
.- Parameters:
textRenderingMode
- The new text rendering mode.
-
getTextRise
public float getTextRise()
Get the current Text Rise, see ISO-320001, 9.3.7 Text Rise,PdfCanvas.setTextRise(float)
.- Returns:
- The current text rise.
-
setTextRise
public void setTextRise(float textRise)
Set the current Text Rise, see ISO-320001, 9.3.7 Text RisePdfCanvas.setTextRise(float)
.- Parameters:
textRise
- The new text rise value.
-
getFlatnessTolerance
public float getFlatnessTolerance()
Gets the current Flatness Tolerance, see ISO-320001, 10.6.2 Flatness Tolerance,PdfCanvas.setFlatnessTolerance(float)
.- Returns:
- The current flatness tolerance.
-
setFlatnessTolerance
public void setFlatnessTolerance(float flatnessTolerance)
Sets the current Flatness Tolerance, see ISO-320001, 10.6.2 Flatness Tolerance,PdfCanvas.setFlatnessTolerance(float)
.- Parameters:
flatnessTolerance
- The new flatness tolerance value.
-
setWordSpacing
public void setWordSpacing(float wordSpacing)
Sets the Word Spacing, see ISO-320001, 9.3.3 Word Spacing,PdfCanvas.setWordSpacing(float)
.- Parameters:
wordSpacing
- The new word spacing value.
-
getWordSpacing
public float getWordSpacing()
Gets the current Word Spacing, see ISO-320001, 9.3.3 Word Spacing,PdfCanvas.setWordSpacing(float)
- Returns:
- The current word spacing
-
setCharSpacing
public void setCharSpacing(float characterSpacing)
Sets the Character Spacing, see ISO-320001, 9.3.2 Character Spacing,PdfCanvas.setCharacterSpacing(float)
- Parameters:
characterSpacing
- The new character spacing value.
-
getCharSpacing
public float getCharSpacing()
Gets the current Character Spacing, see ISO-320001, 9.3.2 Character Spacing,PdfCanvas.setCharacterSpacing(float)
.- Returns:
- The current character spacing value.
-
getLeading
public float getLeading()
Gets the current Leading, see ISO-320001, 9.3.5 Leading,PdfCanvas.setLeading(float)
.- Returns:
- The current leading value.
-
setLeading
public void setLeading(float leading)
Sets the Leading, see ISO-320001, 9.3.5 Leading,PdfCanvas.setLeading(float)
.- Parameters:
leading
- The new leading value.
-
getHorizontalScaling
public float getHorizontalScaling()
Gets the current Horizontal Scaling percentage, see ISO-320001, 9.3.4 Horizontal Scaling.PdfCanvas.setHorizontalScaling(float)
.- Returns:
- The current horizontal scaling factor.
-
setHorizontalScaling
public void setHorizontalScaling(float scale)
Sets the Horizontal Scaling percentage for text, see ISO-320001, 9.3.4 Horizontal Scaling,PdfCanvas.setHorizontalScaling(float)
.- Parameters:
scale
- The new horizontal scaling factor.
-
getStrokeOverprint
public boolean getStrokeOverprint()
Get the Stroke Overprint flag, see ISO 32000-1, 8.6.7 Overprint Control and 11.7.4.5 Summary of Overprinting Behaviour,PdfExtGState.getStrokeOverprintFlag()
.- Returns:
- The current stroke overprint flag.
-
getFillOverprint
public boolean getFillOverprint()
Get the Fill Overprint flag, see ISO 32000-1, 8.6.7 Overprint Control and 11.7.4.5 Summary of Overprinting Behaviour,PdfExtGState.getFillOverprintFlag()
.- Returns:
- The current stroke overprint flag.
-
getOverprintMode
public int getOverprintMode()
Get the Overprint Mode, see ISO 32000-1, 8.6.7 Overprint Control and 11.7.4.5 Summary of Overprinting Behaviour,PdfExtGState.getOverprintMode()
.- Returns:
- The current overprint mode.
-
getBlackGenerationFunction
public PdfObject getBlackGenerationFunction()
Gets the current Black-generation function, see ISO32000-1, 11.7.5.3 Rendering Intent and Colour Conversions and Table 58 – Entries in a Graphics State Parameter Dictionary,PdfExtGState.getBlackGenerationFunction()
.- Returns:
- the current black-generation function.
-
getBlackGenerationFunction2
public PdfObject getBlackGenerationFunction2()
Gets the current overruling Black-generation function, see ISO32000-1, 11.7.5.3 Rendering Intent and Colour Conversions and Table 58 – Entries in a Graphics State Parameter Dictionary,PdfExtGState.getBlackGenerationFunction2()
.- Returns:
- the current overruling black-generation function.
-
getUnderColorRemovalFunction
public PdfObject getUnderColorRemovalFunction()
Gets the current Undercolor-removal function, see ISO32000-1, 11.7.5.3 Rendering Intent and Colour Conversions and Table 58 – Entries in a Graphics State Parameter DictionaryPdfExtGState.getUndercolorRemovalFunction()
.- Returns:
- the current black-generation function.
-
getUnderColorRemovalFunction2
public PdfObject getUnderColorRemovalFunction2()
Gets the current overruling Undercolor-removal function, see ISO32000-1, 11.7.5.3 Rendering Intent and Colour Conversions and Table 58 – Entries in a Graphics State Parameter Dictionary,PdfExtGState.getUndercolorRemovalFunction2()
.- Returns:
- the current undercolor-removal function.
-
getTransferFunction
public PdfObject getTransferFunction()
Gets the current Transfer function, see ISO32000-1, 11.7.5.3 Rendering Intent and Colour Conversions and Table 58 – Entries in a Graphics State Parameter Dictionary,PdfExtGState.getTransferFunction()
.- Returns:
- the current transfer function.
-
getTransferFunction2
public PdfObject getTransferFunction2()
Gets the current overruling transer function, see ISO32000-1, 11.7.5.3 Rendering Intent and Colour Conversions and Table 58 – Entries in a Graphics State Parameter Dictionary,PdfExtGState.getTransferFunction2()
.- Returns:
- the current overruling transer function.
-
getHalftone
public PdfObject getHalftone()
Gets the current halftone , see ISO32000-1, 10.5 Halftones and Table 58 – Entries in a Graphics State Parameter Dictionary,PdfExtGState.getHalftone()
.- Returns:
- the current halftone.
-
getSmoothnessTolerance
public java.lang.Float getSmoothnessTolerance()
Gets the current Smoothness Tolerance, see ISO32000-1, 10.6.3 Smoothness Tolerance and Table 58 – Entries in a Graphics State Parameter Dictionary,PdfExtGState.getSmothnessTolerance()
.- Returns:
- the current smoothness tolerance function.
-
getAutomaticStrokeAdjustment
public boolean getAutomaticStrokeAdjustment()
Gets the current Apply Automatic Stroke Adjustment flag, see ISO 32000-1, 10.6.5 Automatic Stroke Adjustment,PdfExtGState.getAutomaticStrokeAdjustmentFlag()
.- Returns:
- The current automatic stroke adjustment flag.
-
getBlendMode
public PdfObject getBlendMode()
Gets the current Blend Mode, see ISO 32000-1, 11.3.5 Blend Mode and 11.6.3 Specifying Blending Colour Space and Blend Mode,PdfExtGState.getBlendMode()
.- Returns:
- The current blend mode.
-
getSoftMask
public PdfObject getSoftMask()
Gets the current Soft Mask, see ISO 32000-1, 11.3.7.2 Source Shape and Opacity, 11.6.4.3 Mask Shape and Opacity and 11.6.5.2 Soft-Mask Dictionaries,PdfExtGState.getSoftMask()
.- Returns:
- The current soft mask.
-
getStrokeOpacity
public float getStrokeOpacity()
Gets the current Stroke Opacity value, see ISO 32000-1, 11.3.7.2 Source Shape and Opacity and 11.6.4.4 Constant Shape and Opacity,PdfExtGState.getStrokeOpacity()
.- Returns:
- the current stroke opacity value.
-
getFillOpacity
public float getFillOpacity()
Gets the current Fill Opacity value, see ISO 32000-1, 11.3.7.2 Source Shape and Opacity and 11.6.4.4 Constant Shape and Opacity,PdfExtGState.getFillOpacity()
.- Returns:
- the current fill opacity value.
-
getAlphaIsShape
public boolean getAlphaIsShape()
Gets the current Alpha is shape flag, see ISO 32000-1, 11.3.7.2 Source Shape and Opacity and 11.6.4.3 Mask Shape and Opacity,PdfExtGState.getAlphaSourceFlag()
.- Returns:
- The current alpha is shape flag.
-
getTextKnockout
public boolean getTextKnockout()
Gets the current Text Knockout flag, see ISO 32000-1, 9.3.8 Text Knockout,PdfExtGState.getTextKnockoutFlag()
.- Returns:
- The current text knockout flag.
-
getHTP
public PdfObject getHTP()
Gets the current Halftone Phase, see Portable Document Format Reference Manual Version 1.2, 7.12 Extended graphics states and PostScript Language Reference Manual, Second Edition, 7.3.3, Halftone Phase.- Returns:
- the current halftone phase.
-
updateFromExtGState
public void updateFromExtGState(PdfExtGState extGState)
Updates current graphic state with values from extended graphic state dictionary.- Parameters:
extGState
- the wrapper around the extended graphic state dictionary
-
updateFromExtGState
void updateFromExtGState(PdfExtGState extGState, PdfDocument pdfDocument)
Updates current graphic state with values from extended graphic state dictionary.- Parameters:
extGState
- the wrapper around the extended graphic state dictionarypdfDocument
- the document to retrieve fonts from. Needed when the newly created fonts are used
-
copyFrom
private void copyFrom(CanvasGraphicsState source)
-
-