Class PdfExtGState
Graphics state parameter dictionary wrapper.
public class PdfExtGState : PdfObjectWrapper<PdfDictionary>
- Inheritance
-
PdfExtGState
- Inherited Members
Remarks
Graphics state parameter dictionary wrapper. See ISO-320001, 8.4.5 Graphics State Parameter Dictionaries.
Constructors
PdfExtGState()
Create default instance of graphics state parameter dictionary
public PdfExtGState()
PdfExtGState(PdfDictionary)
Create instance of graphics state parameter dictionary wrapper by existed PdfDictionary object
public PdfExtGState(PdfDictionary pdfObject)
Parameters
pdfObject
PdfDictionaryinstance of graphics state parameter dictionary
Fields
BM_COLOR
Standard nonseparable blend mode.
public static PdfName BM_COLOR
Field Value
Remarks
Standard nonseparable blend mode. See ISO-320001, table 137
BM_COLOR_BURN
Standard separable blend mode.
public static PdfName BM_COLOR_BURN
Field Value
Remarks
Standard separable blend mode. See ISO-320001, table 136
BM_COLOR_DODGE
Standard separable blend mode.
public static PdfName BM_COLOR_DODGE
Field Value
Remarks
Standard separable blend mode. See ISO-320001, table 136
BM_DARKEN
Standard separable blend mode.
public static PdfName BM_DARKEN
Field Value
Remarks
Standard separable blend mode. See ISO-320001, table 136
BM_DIFFERENCE
Standard separable blend mode.
public static PdfName BM_DIFFERENCE
Field Value
Remarks
Standard separable blend mode. See ISO-320001, table 136
BM_EXCLUSION
Standard separable blend mode.
public static PdfName BM_EXCLUSION
Field Value
Remarks
Standard separable blend mode. See ISO-320001, table 136
BM_HARD_LIGHT
Standard separable blend mode.
public static PdfName BM_HARD_LIGHT
Field Value
Remarks
Standard separable blend mode. See ISO-320001, table 136
BM_HUE
Standard nonseparable blend mode.
public static PdfName BM_HUE
Field Value
Remarks
Standard nonseparable blend mode. See ISO-320001, table 137
BM_LIGHTEN
Standard separable blend mode.
public static PdfName BM_LIGHTEN
Field Value
Remarks
Standard separable blend mode. See ISO-320001, table 136
BM_LUMINOSITY
Standard nonseparable blend mode.
public static PdfName BM_LUMINOSITY
Field Value
Remarks
Standard nonseparable blend mode. See ISO-320001, table 137
BM_MULTIPLY
Standard separable blend mode.
public static PdfName BM_MULTIPLY
Field Value
Remarks
Standard separable blend mode. See ISO-320001, table 136
BM_NORMAL
Standard separable blend mode.
public static PdfName BM_NORMAL
Field Value
Remarks
Standard separable blend mode. See ISO-320001, table 136
BM_OVERLAY
Standard separable blend mode.
public static PdfName BM_OVERLAY
Field Value
Remarks
Standard separable blend mode. See ISO-320001, table 136
BM_SATURATION
Standard nonseparable blend mode.
public static PdfName BM_SATURATION
Field Value
Remarks
Standard nonseparable blend mode. See ISO-320001, table 137
BM_SCREEN
Standard separable blend mode.
public static PdfName BM_SCREEN
Field Value
Remarks
Standard separable blend mode. See ISO-320001, table 136
BM_SOFT_LIGHT
Standard separable blend mode.
public static PdfName BM_SOFT_LIGHT
Field Value
Remarks
Standard separable blend mode. See ISO-320001, table 136
Methods
Flush()
To manually flush a
PdfObject
behind this wrapper, you have to ensure
that this object is added to the document, i.e. it has an indirect reference.
public override void Flush()
Remarks
To manually flush a
PdfObject
behind this wrapper, you have to ensure
that this object is added to the document, i.e. it has an indirect reference.
Basically this means that before flushing you need to explicitly call
MakeIndirect(PdfDocument).
For example: wrapperInstance.makeIndirect(document).flush();
Note that not every wrapper require this, only those that have such warning in documentation.
GetAlphaSourceFlag()
Gets the alpha source flag ("alpha is shape"), specifying whether the current soft mask and alpha constant
shall be interpreted as shape values (
true
) or opacity values (
false
),
AIS
key.
public virtual bool? GetAlphaSourceFlag()
Returns
GetAutomaticStrokeAdjustmentFlag()
Gets value of an automatic stroke adjustment flag,
SA
key.
public virtual bool? GetAutomaticStrokeAdjustmentFlag()
Returns
GetBlackGenerationFunction()
Gets the black-generation function value,
BG
.
public virtual PdfObject GetBlackGenerationFunction()
Returns
- PdfObject
a PdfObject , should be an object representing custom function (see IPdfFunction object wrapper for convenience API in reading/manipulating such function objects).
GetBlackGenerationFunction2()
Gets the black-generation function value or
Default
,
BG2
key.
public virtual PdfObject GetBlackGenerationFunction2()
Returns
- PdfObject
the returned value is PdfObject value, which is either a PdfName of a predefined value or an object representing custom function (see IPdfFunction object wrapper for convenience API in reading/manipulating such function objects).
GetBlendMode()
Gets the current blend mode for the transparent imaging model,
BM
key.
public virtual PdfObject GetBlendMode()
Returns
GetDashPattern()
Gets line dash pattern value,
D
key.
public virtual PdfArray GetDashPattern()
Returns
- PdfArray
a
PdfArray
, that represents line dash pattern.
GetFillOpacity()
Gets the current alpha constant, specifying the constant shape or constant opacity value
for non-stroking operations in the transparent imaging model,
ca
key.
public virtual float? GetFillOpacity()
Returns
GetFillOverprintFlag()
Get overprint flag value for non-stroking operations,
op
key.
public virtual bool? GetFillOverprintFlag()
Returns
GetFlatnessTolerance()
Gets the flatness tolerance value,
FL
key.
public virtual float? GetFlatnessTolerance()
Returns
GetFont()
Gets font and size,
Font
key.
public virtual PdfArray GetFont()
Returns
- PdfArray
a PdfArray of the form
[font size]
, wherefont
shall be an indirect reference to a font dictionary andsize
shall be a number expressed in text space units.
GetHalftone()
Gets the halftone dictionary, stream or
Default
,
HT
key.
public virtual PdfObject GetHalftone()
Returns
- PdfObject
a PdfObject , should be either PdfDictionary , PdfStream or PdfName.
GetHalftoneOrigin()
PDF 2.0.
public virtual float[] GetHalftoneOrigin()
Returns
- float[]
an array of two values specifying X and Y values of the halftone origin in the current coordinate system, respectively, or
null
if halftone origin is not specified
Remarks
PDF 2.0. Gets halftone origin
GetLineCapStyle()
Gets line gap style value,
LC
key.
public virtual int? GetLineCapStyle()
Returns
- int?
0 - butt cap, 1 - round cap, 2 - projecting square cap.
GetLineJoinStyle()
Gets line join style value,
LJ
key.
public virtual int? GetLineJoinStyle()
Returns
- int?
0 - miter join (see also miter limit), 1 - round join, 2 - bevel join.
GetLineWidth()
Gets line width value,
LW
key.
public virtual float? GetLineWidth()
Returns
GetMiterLimit()
Gets miter limit value,
ML key
.
public virtual float? GetMiterLimit()
Returns
Remarks
Gets miter limit value,
ML key
. See also line join style.
GetOverprintMode()
Get overprint control mode,
OPM
key.
public virtual int? GetOverprintMode()
Returns
GetRenderingIntent()
Gets rendering intent value,
RI
key.
public virtual PdfName GetRenderingIntent()
Returns
- PdfName
a
PdfName
instance.
Remarks
Gets rendering intent value,
RI
key.
Valid values are:
AbsoluteColorimetric
,
RelativeColorimetric
,
Saturation
,
Perceptual
.
GetSmothnessTolerance()
Gets the smoothness tolerance value,
SM
key.
public virtual float? GetSmothnessTolerance()
Returns
GetSoftMask()
Gets the current soft mask,
SMask
key.
public virtual PdfObject GetSoftMask()
Returns
- PdfObject
a PdfObject , should be either PdfName or PdfDictionary.
GetStrokeOpacity()
Gets the current alpha constant, specifying the constant shape or constant opacity value
for stroking operations in the transparent imaging model,
CA
key.
public virtual float? GetStrokeOpacity()
Returns
GetStrokeOverprintFlag()
Get overprint flag value for stroking operations,
OP
key.
public virtual bool? GetStrokeOverprintFlag()
Returns
GetTextKnockoutFlag()
Gets the text knockout flag, which determine the behaviour of overlapping glyphs
within a text object in the transparent imaging model,
TK
key.
public virtual bool? GetTextKnockoutFlag()
Returns
GetTransferFunction()
Gets the transfer function value,
TR
key.
public virtual PdfObject GetTransferFunction()
Returns
- PdfObject
the returned value is PdfObject value, which is either a PdfName or PdfArray of a predefined value or an object representing custom function (see IPdfFunction object wrapper for convenience API in reading/manipulating such function objects).
GetTransferFunction2()
Gets the transfer function value or
Default
,
TR2
key.
public virtual PdfObject GetTransferFunction2()
Returns
- PdfObject
the returned value is PdfObject value, which is either a PdfName or PdfArray of a predefined value or an object representing custom function (see IPdfFunction object wrapper for convenience API in reading/manipulating such function objects).
GetUndercolorRemovalFunction()
Gets the undercolor-removal function,
UCR
key.
public virtual PdfObject GetUndercolorRemovalFunction()
Returns
- PdfObject
a PdfObject , should be an object representing custom function (see IPdfFunction object wrapper for convenience API in reading/manipulating such function objects).
GetUndercolorRemovalFunction2()
Gets the undercolor-removal function value or
Default
,
UCR2
key.
public virtual PdfObject GetUndercolorRemovalFunction2()
Returns
- PdfObject
the returned value is PdfObject value, which is either a PdfName of a predefined value or an object representing custom function (see IPdfFunction object wrapper for convenience API in reading/manipulating such function objects).
IsBlackPointCompensationUsed()
PDF 2.0.
public virtual bool? IsBlackPointCompensationUsed()
Returns
- bool?
true
if black point compensation is used,false
if it is not used, ornull
is the value is set to Default, or not set at all
Remarks
PDF 2.0. Checks whether the black point compensation is performed while doing CIE-based colour conversions.
IsWrappedObjectMustBeIndirect()
protected override bool IsWrappedObjectMustBeIndirect()
Returns
Put(PdfName, PdfObject)
Puts the value into Graphics state parameter dictionary and associates it with the specified key.
public virtual PdfExtGState Put(PdfName key, PdfObject value)
Parameters
key
PdfNamekey to insert or to override
value
PdfObjectthe value to associate with the specified key
Returns
- PdfExtGState
object itself.
Remarks
Puts the value into Graphics state parameter dictionary and associates it with the specified key. If the key is already present, it will override the old value with the specified one.
SetAlphaSourceFlag(bool)
Sets the alpha source flag ("alpha is shape"), specifying whether the current soft mask and alpha constant
shall be interpreted as shape values (
true
) or opacity values (
false
),
AIS
key.
public virtual PdfExtGState SetAlphaSourceFlag(bool alphaSourceFlag)
Parameters
Returns
- PdfExtGState
object itself.
SetAutomaticStrokeAdjustmentFlag(bool)
Sets value of an automatic stroke adjustment flag,
SA
key.
public virtual PdfExtGState SetAutomaticStrokeAdjustmentFlag(bool strokeAdjustment)
Parameters
strokeAdjustment
boola
boolean
value.
Returns
- PdfExtGState
object itself.
SetBlackGenerationFunction(PdfObject)
Sets the black-generation function value,
BG
.
public virtual PdfExtGState SetBlackGenerationFunction(PdfObject blackGenerationFunction)
Parameters
blackGenerationFunction
PdfObjecta PdfObject , shall be an object representing custom function (see IPdfFunction object wrapper for convenience API in reading/manipulating such function objects).
Returns
- PdfExtGState
object itself.
SetBlackGenerationFunction2(PdfObject)
Sets the black-generation function value or
Default
,
BG2
key.
public virtual PdfExtGState SetBlackGenerationFunction2(PdfObject blackGenerationFunction2)
Parameters
blackGenerationFunction2
PdfObjecta PdfObject value, shall be an object representing custom function (see IPdfFunction object wrapper for convenience API in reading/manipulating such function objects) or
Default
.
Returns
- PdfExtGState
object itself.
Remarks
Sets the black-generation function value or
Default
,
BG2
key.
Note, if both
BG
and
BG2
are present in the same graphics state parameter dictionary,
BG2
takes precedence.
SetBlendMode(PdfObject)
Sets the current blend mode for the transparent imaging model,
BM
key.
public virtual PdfExtGState SetBlendMode(PdfObject blendMode)
Parameters
blendMode
PdfObjecta PdfObject , shall be either PdfName or PdfArray ; array is deprecated in PDF 2.0.
Returns
- PdfExtGState
object itself.
SetDashPattern(PdfArray)
Sets line dash pattern value,
D
key.
public virtual PdfExtGState SetDashPattern(PdfArray dashPattern)
Parameters
dashPattern
PdfArraya
PdfArray
, that represents line dash pattern.
Returns
- PdfExtGState
object itself.
SetFillOpacity(float)
Sets the current alpha constant, specifying the constant shape or constant opacity value
for non-stroking operations in the transparent imaging model,
ca
key.
public virtual PdfExtGState SetFillOpacity(float fillingAlphaConstant)
Parameters
fillingAlphaConstant
floata
float
value.
Returns
- PdfExtGState
object itself.
SetFillOverPrintFlag(bool)
Set overprint flag value for non-stroking operations,
op
key.
public virtual PdfExtGState SetFillOverPrintFlag(bool fillOverprintFlag)
Parameters
Returns
- PdfExtGState
object itself.
SetFlatnessTolerance(float)
Sets the flatness tolerance value,
FL
key.
public virtual PdfExtGState SetFlatnessTolerance(float flatnessTolerance)
Parameters
flatnessTolerance
floata
float
value.
Returns
- PdfExtGState
object itself.
SetFont(PdfArray)
Sets font and size,
Font
key.
public virtual PdfExtGState SetFont(PdfArray font)
Parameters
font
PdfArraya PdfArray of the form
[font size]
, wherefont
shall be an indirect reference to a font dictionary andsize
shall be a number expressed in text space units.
Returns
- PdfExtGState
object itself.
Remarks
Sets font and size,
Font
key.
NOTE: If you want add the font object which has just been created, make sure to register the font with
AddFont(PdfFont)
method first.
SetHalftone(PdfObject)
Sets the halftone or
Default
,
HT
key.
public virtual PdfExtGState SetHalftone(PdfObject halftone)
Parameters
halftone
PdfObjecta PdfObject , shall be either PdfDictionary , PdfStream or PdfName.
Returns
- PdfExtGState
object itself.
SetHalftoneOrigin(float, float)
PDF 2.0.
public virtual PdfExtGState SetHalftoneOrigin(float x, float y)
Parameters
x
floatX location of the halftone origin in the current coordinate system
y
floatY location of the halftone origin in the current coordinate system
Returns
- PdfExtGState
this PdfExtGState instance
Remarks
PDF 2.0. Sets halftone origin
SetLineCapStyle(int)
Sets line gap style value,
LC
key.
public virtual PdfExtGState SetLineCapStyle(int lineCapStyle)
Parameters
lineCapStyle
int0 - butt cap, 1 - round cap, 2 - projecting square cap.
Returns
- PdfExtGState
object itself.
SetLineJoinStyle(int)
Sets line join style value,
LJ
key.
public virtual PdfExtGState SetLineJoinStyle(int lineJoinStyle)
Parameters
lineJoinStyle
int0 - miter join (see also miter limit), 1 - round join, 2 - bevel join.
Returns
- PdfExtGState
object itself.
SetLineWidth(float)
Sets line width value,
LW
key.
public virtual PdfExtGState SetLineWidth(float lineWidth)
Parameters
lineWidth
floata
float
value.
Returns
- PdfExtGState
object itself.
SetMiterLimit(float)
Sets miter limit value,
ML key
.
public virtual PdfExtGState SetMiterLimit(float miterLimit)
Parameters
miterLimit
floata
float
value.
Returns
- PdfExtGState
object itself.
Remarks
Sets miter limit value,
ML key
. See also line join style.
SetOverprintMode(int)
Set overprint control mode,
OPM
key.
public virtual PdfExtGState SetOverprintMode(int overprintMode)
Parameters
overprintMode
intan
int
value, see ISO-320001, 8.6.7 Overprint Control.
Returns
- PdfExtGState
object itself.
SetRenderingIntent(PdfName)
Sets rendering intent value,
RI
key.
public virtual PdfExtGState SetRenderingIntent(PdfName renderingIntent)
Parameters
renderingIntent
PdfNamea
PdfName
instance, Valid values are:AbsoluteColorimetric
,RelativeColorimetric
,Saturation
,Perceptual
.
Returns
- PdfExtGState
object itself.
SetSmoothnessTolerance(float)
Sets the smoothness tolerance value,
SM
key.
public virtual PdfExtGState SetSmoothnessTolerance(float smoothnessTolerance)
Parameters
smoothnessTolerance
floata
float
value.
Returns
- PdfExtGState
object itself.
SetSoftMask(PdfObject)
Sets the current soft mask,
SMask
key.
public virtual PdfExtGState SetSoftMask(PdfObject sMask)
Parameters
sMask
PdfObjecta PdfObject , shall be either PdfName or PdfDictionary.
Returns
- PdfExtGState
object itself.
SetStrokeOpacity(float)
Sets the current alpha constant, specifying the constant shape or constant opacity value
for stroking operations in the transparent imaging model,
CA
key.
public virtual PdfExtGState SetStrokeOpacity(float strokingAlphaConstant)
Parameters
strokingAlphaConstant
floata
float
value.
Returns
- PdfExtGState
object itself.
SetStrokeOverPrintFlag(bool)
Set overprint flag value for stroking operations,
OP
key.
public virtual PdfExtGState SetStrokeOverPrintFlag(bool strokeOverPrintFlag)
Parameters
Returns
- PdfExtGState
object itself.
SetTextKnockoutFlag(bool)
Sets the text knockout flag, which determine the behaviour of overlapping glyphs
within a text object in the transparent imaging model,
TK
key.
public virtual PdfExtGState SetTextKnockoutFlag(bool textKnockoutFlag)
Parameters
Returns
- PdfExtGState
object itself.
SetTransferFunction(PdfObject)
Sets the transfer function value,
TR
key.
public virtual PdfExtGState SetTransferFunction(PdfObject transferFunction)
Parameters
transferFunction
PdfObjecta PdfObject , shall be either a PdfName or PdfArray of a predefined value or an object representing custom function (see IPdfFunction object wrapper for convenience API in reading/manipulating such function objects).
Returns
- PdfExtGState
object itself.
SetTransferFunction2(PdfObject)
Sets the transfer function value or
Default
,
TR2
key.
public virtual PdfExtGState SetTransferFunction2(PdfObject transferFunction2)
Parameters
transferFunction2
PdfObjecta PdfObject , shall be either a PdfName or PdfArray of a predefined value or an object representing custom function (see IPdfFunction object wrapper for convenience API in reading/manipulating such function objects).
Returns
- PdfExtGState
object itself.
Remarks
Sets the transfer function value or
Default
,
TR2
key.
Note, if both
TR
and
TR2
are present in the same graphics state parameter dictionary,
TR2
takes precedence.
SetUndercolorRemovalFunction(PdfObject)
Sets the undercolor-removal function,
UCR
key.
public virtual PdfExtGState SetUndercolorRemovalFunction(PdfObject undercolorRemovalFunction)
Parameters
undercolorRemovalFunction
PdfObjecta PdfObject , shall be an object representing custom function (see IPdfFunction object wrapper for convenience API in reading/manipulating such function objects).
Returns
- PdfExtGState
object itself.
SetUndercolorRemovalFunction2(PdfObject)
Sets the undercolor-removal function value or
Default
,
UCR2
key.
public virtual PdfExtGState SetUndercolorRemovalFunction2(PdfObject undercolorRemovalFunction2)
Parameters
undercolorRemovalFunction2
PdfObjecta PdfObject value, shall be an object representing custom function (see IPdfFunction object wrapper for convenience API in reading/manipulating such function objects) or
Default
.
Returns
- PdfExtGState
object itself.
Remarks
Sets the undercolor-removal function value or
Default
,
UCR2
key.
Note, if both
UCR
and
UCR2
are present in the same graphics state parameter dictionary,
UCR2
takes precedence.
SetUseBlackPointCompensation(bool)
PDF 2.0.
public virtual PdfExtGState SetUseBlackPointCompensation(bool useBlackPointCompensation)
Parameters
useBlackPointCompensation
booltrue
to enable,false
to disable
Returns
- PdfExtGState
object itself
Remarks
PDF 2.0. This graphics state parameter controls whether black point compensation is performed while doing CIE-based colour conversions.