Class CanvasGraphicsState
This class is designed for internal usage.
public class CanvasGraphicsState
- Inheritance
-
CanvasGraphicsState
- Derived
- Inherited Members
Remarks
This class is designed for internal usage.
Use PdfExtGState
class and PdfCanvas#setExtGState()
method for setting extended graphics properties.
Constructors
CanvasGraphicsState()
Internal empty and default constructor.
protected CanvasGraphicsState()
CanvasGraphicsState(CanvasGraphicsState)
Copy constructor.
public CanvasGraphicsState(CanvasGraphicsState source)
Parameters
source
CanvasGraphicsStatethe Graphics State to copy from
Methods
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, GetAlphaSourceFlag() .
public virtual bool GetAlphaIsShape()
Returns
- bool
The current alpha is shape flag.
GetAutomaticStrokeAdjustment()
Gets the current Apply Automatic Stroke Adjustment flag, see ISO 32000-1, 10.6.5 Automatic Stroke Adjustment, GetAutomaticStrokeAdjustmentFlag().
public virtual bool GetAutomaticStrokeAdjustment()
Returns
- bool
The current automatic stroke adjustment flag.
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, GetBlackGenerationFunction().
public virtual PdfObject GetBlackGenerationFunction()
Returns
- PdfObject
the current black-generation function.
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, GetBlackGenerationFunction2().
public virtual PdfObject GetBlackGenerationFunction2()
Returns
- PdfObject
the current overruling black-generation function.
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, GetBlendMode().
public virtual PdfObject GetBlendMode()
Returns
- PdfObject
The current blend mode.
GetCharSpacing()
Gets the current Character Spacing, see ISO-320001, 9.3.2 Character Spacing, SetCharacterSpacing(float).
public virtual float GetCharSpacing()
Returns
- float
The current character spacing value.
GetCtm()
public virtual Matrix GetCtm()
Returns
- Matrix
current transformation matrix.
GetDashPattern()
Gets line dash pattern value,
D
key, see ISO-320001, 8.4.3.6 Line Dash Pattern,
SetDashPattern(PdfArray).
public virtual PdfArray GetDashPattern()
Returns
- PdfArray
a
PdfArray
, that represents line dash pattern.
GetFillColor()
Gets the current fill color.
public virtual Color GetFillColor()
Returns
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, GetFillOpacity().
public virtual float GetFillOpacity()
Returns
- float
the current fill opacity value.
GetFillOverprint()
Get the Fill Overprint flag, see ISO 32000-1, 8.6.7 Overprint Control and 11.7.4.5 Summary of Overprinting Behaviour, GetFillOverprintFlag().
public virtual bool GetFillOverprint()
Returns
- bool
The current stroke overprint flag.
GetFlatnessTolerance()
Gets the current Flatness Tolerance, see ISO-320001, 10.6.2 Flatness Tolerance, SetFlatnessTolerance(float).
public virtual float GetFlatnessTolerance()
Returns
- float
The current flatness tolerance.
GetFont()
Gets the current PdfFont.
public virtual PdfFont GetFont()
Returns
GetFontSize()
Gets the font size.
public virtual float GetFontSize()
Returns
- float
The current font size.
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.
public virtual PdfObject GetHTP()
Returns
- PdfObject
the current halftone phase.
GetHalftone()
Gets the current halftone , see ISO32000-1, 10.5 Halftones and Table 58 – Entries in a Graphics State Parameter Dictionary, GetHalftone().
public virtual PdfObject GetHalftone()
Returns
- PdfObject
the current halftone.
GetHorizontalScaling()
Gets the current Horizontal Scaling percentage, see ISO-320001, 9.3.4 Horizontal Scaling.
public virtual float GetHorizontalScaling()
Returns
- float
The current horizontal scaling factor.
Remarks
Gets the current Horizontal Scaling percentage, see ISO-320001, 9.3.4 Horizontal Scaling. SetHorizontalScaling(float).
GetLeading()
Gets the current Leading, see ISO-320001, 9.3.5 Leading, SetLeading(float).
public virtual float GetLeading()
Returns
- float
The current leading value.
GetLineCapStyle()
Gets the current line cap style, see ISO-320001, 8.4.3.3 Line Cap Style.
public virtual int GetLineCapStyle()
Returns
- int
The current cap style.
- See Also
GetLineJoinStyle()
Gets the current line join style, see ISO-320001, 8.4.3.4 Line Join Style.
public virtual int GetLineJoinStyle()
Returns
- int
The current line join style.
- See Also
GetLineWidth()
Gets the current line width.
public virtual float GetLineWidth()
Returns
- float
The canvas graphics state line width.
GetMiterLimit()
Gets the current miter limit, see ISO-320001, 8.4.3.5 Miter Limit.
public virtual float GetMiterLimit()
Returns
- float
The current miter limit.
- See Also
GetOverprintMode()
Get the Overprint Mode, see ISO 32000-1, 8.6.7 Overprint Control and 11.7.4.5 Summary of Overprinting Behaviour, GetOverprintMode().
public virtual int GetOverprintMode()
Returns
- int
The current overprint mode.
GetRenderingIntent()
Gets the rendering intent, see GetRenderingIntent().
public virtual PdfName GetRenderingIntent()
Returns
- PdfName
the rendering intent name.
GetSmoothnessTolerance()
Gets the current Smoothness Tolerance, see ISO32000-1, 10.6.3 Smoothness Tolerance and Table 58 – Entries in a Graphics State Parameter Dictionary, GetSmothnessTolerance().
public virtual float? GetSmoothnessTolerance()
Returns
- float?
the current smoothness tolerance function.
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, GetSoftMask().
public virtual PdfObject GetSoftMask()
Returns
- PdfObject
The current soft mask.
GetStrokeColor()
Gets the current stroke color.
public virtual Color GetStrokeColor()
Returns
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, GetStrokeOpacity().
public virtual float GetStrokeOpacity()
Returns
- float
the current stroke opacity value.
GetStrokeOverprint()
Get the Stroke Overprint flag, see ISO 32000-1, 8.6.7 Overprint Control and 11.7.4.5 Summary of Overprinting Behaviour, GetStrokeOverprintFlag().
public virtual bool GetStrokeOverprint()
Returns
- bool
The current stroke overprint flag.
GetTextKnockout()
Gets the current Text Knockout flag, see ISO 32000-1, 9.3.8 Text Knockout, GetTextKnockoutFlag().
public virtual bool GetTextKnockout()
Returns
- bool
The current text knockout flag.
GetTextRenderingMode()
Gets the current Text Rendering Mode, see ISO-320001, 9.3.6 Text Rendering Mode, SetTextRenderingMode(int).
public virtual int GetTextRenderingMode()
Returns
- int
The current text rendering mode.
GetTextRise()
Get the current Text Rise, see ISO-320001, 9.3.7 Text Rise, SetTextRise(float).
public virtual float GetTextRise()
Returns
- float
The current text rise.
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, GetTransferFunction().
public virtual PdfObject GetTransferFunction()
Returns
- PdfObject
the current transfer function.
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, GetTransferFunction2().
public virtual PdfObject GetTransferFunction2()
Returns
- PdfObject
the current overruling transer function.
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 Dictionary GetUndercolorRemovalFunction().
public virtual PdfObject GetUnderColorRemovalFunction()
Returns
- PdfObject
the current black-generation function.
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, GetUndercolorRemovalFunction2().
public virtual PdfObject GetUnderColorRemovalFunction2()
Returns
- PdfObject
the current undercolor-removal function.
GetWordSpacing()
Gets the current Word Spacing, see ISO-320001, 9.3.3 Word Spacing, SetWordSpacing(float)
public virtual float GetWordSpacing()
Returns
- float
The current word spacing
SetCharSpacing(float)
Sets the Character Spacing, see ISO-320001, 9.3.2 Character Spacing, SetCharacterSpacing(float)
public virtual void SetCharSpacing(float characterSpacing)
Parameters
characterSpacing
floatThe new character spacing value.
SetDashPattern(PdfArray)
Sets line dash pattern value,
D
key, see ISO-320001, 8.4.3.6 Line Dash Pattern,
SetDashPattern(PdfArray).
public virtual void SetDashPattern(PdfArray dashPattern)
Parameters
dashPattern
PdfArraya
PdfArray
, that represents line dash pattern.
SetFillColor(Color)
Sets the current fill color.
public virtual void SetFillColor(Color fillColor)
Parameters
fillColor
ColorThe new fill color.
SetFlatnessTolerance(float)
Sets the current Flatness Tolerance, see ISO-320001, 10.6.2 Flatness Tolerance, SetFlatnessTolerance(float).
public virtual void SetFlatnessTolerance(float flatnessTolerance)
Parameters
flatnessTolerance
floatThe new flatness tolerance value.
SetFont(PdfFont)
Sets the current PdfFont.
public virtual void SetFont(PdfFont font)
Parameters
SetFontSize(float)
Sets the font size.
public virtual void SetFontSize(float fontSize)
Parameters
fontSize
floatThe new font size.
SetHorizontalScaling(float)
Sets the Horizontal Scaling percentage for text, see ISO-320001, 9.3.4 Horizontal Scaling, SetHorizontalScaling(float).
public virtual void SetHorizontalScaling(float scale)
Parameters
scale
floatThe new horizontal scaling factor.
SetLeading(float)
Sets the Leading, see ISO-320001, 9.3.5 Leading, SetLeading(float).
public virtual void SetLeading(float leading)
Parameters
leading
floatThe new leading value.
SetLineCapStyle(int)
Sets the current line cap style, see ISO-320001, 8.4.3.3 Line Cap Style.
public virtual void SetLineCapStyle(int lineCapStyle)
Parameters
lineCapStyle
intThe new cap style value.
- See Also
SetLineJoinStyle(int)
Sets the current line join style, see ISO-320001, 8.4.3.4 Line Join Style.
public virtual void SetLineJoinStyle(int lineJoinStyle)
Parameters
lineJoinStyle
intThe new line join style value.
- See Also
SetLineWidth(float)
Sets the current line width.
public virtual void SetLineWidth(float lineWidth)
Parameters
lineWidth
floatThe new line width.
SetMiterLimit(float)
Sets the current miter limit, see ISO-320001, 8.4.3.5 Miter Limit.
public virtual void SetMiterLimit(float miterLimit)
Parameters
miterLimit
floatThe new miter limit value.
- See Also
SetRenderingIntent(PdfName)
Sets the rendering intent, see GetRenderingIntent().
public virtual void SetRenderingIntent(PdfName renderingIntent)
Parameters
renderingIntent
PdfNamethe rendering intent name.
SetStrokeColor(Color)
Sets the current stroke color.
public virtual void SetStrokeColor(Color strokeColor)
Parameters
strokeColor
ColorThe new stroke color.
SetTextRenderingMode(int)
Sets the current Text Rendering Mode, see ISO-320001, 9.3.6 Text Rendering Mode, SetTextRenderingMode(int).
public virtual void SetTextRenderingMode(int textRenderingMode)
Parameters
textRenderingMode
intThe new text rendering mode.
SetTextRise(float)
Set the current Text Rise, see ISO-320001, 9.3.7 Text Rise SetTextRise(float).
public virtual void SetTextRise(float textRise)
Parameters
textRise
floatThe new text rise value.
SetWordSpacing(float)
Sets the Word Spacing, see ISO-320001, 9.3.3 Word Spacing, SetWordSpacing(float).
public virtual void SetWordSpacing(float wordSpacing)
Parameters
wordSpacing
floatThe new word spacing value.
UpdateCtm(float, float, float, float, float, float)
Updates current transformation matrix.
public virtual void UpdateCtm(float a, float b, float c, float d, float e, float f)
Parameters
a
floatelement at (1,1) of the transformation matrix
b
floatelement at (1,2) of the transformation matrix
c
floatelement at (2,1) of the transformation matrix
d
floatelement at (2,2) of the transformation matrix
e
floatelement at (3,1) of the transformation matrix
f
floatelement at (3,2) of the transformation matrix
Remarks
Updates current transformation matrix. The third column will always be [0 0 1]
UpdateCtm(Matrix)
Updates current transformation matrix.
public virtual void UpdateCtm(Matrix newCtm)
Parameters
newCtm
Matrixnew current transformation matrix.
UpdateFromExtGState(PdfExtGState)
Updates current graphic state with values from extended graphic state dictionary.
public virtual void UpdateFromExtGState(PdfExtGState extGState)
Parameters
extGState
PdfExtGStatethe wrapper around the extended graphic state dictionary
UpdateFromExtGState(PdfDictionary)
Updates this object with the values from a dictionary.
public virtual void UpdateFromExtGState(PdfDictionary extGState)
Parameters
extGState
PdfDictionarythe dictionary containing source parameters