Show / Hide Table of Contents

# Class GState

GState is a class that keeps track of a number of style attributes used to visually define graphical Elements. Each PDF::Element has an associated GState that can be used to query or set various graphics properties.

##### Inheritance

object
GState

##### Inherited Members

object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()

###### Namespace: pdftron.PDF

###### Assembly: PDFNet.dll

##### Syntax

    public class GState

##### Remarks

current clipping path is not tracked in the graphics state for efficiency
reasons. In most cases tracking of the current clipping path is best left to the client.

### Methods

#### Concat(double, double, double, double, double, double)

Concat.

##### Declaration

    public void Concat(double a, double b, double c, double d, double h, double v)

##### Parameters

Type | Name | Description
--- | --- | ---
double | a | horizontal 'scaling' component of the new text matrix.
double | b | 'rotation' component of the new text matrix.
double | c | 'rotation' component of the new text matrix.
double | d | vertical 'scaling' component of the new text matrix.
double | h | horizontal translation component of the new text matrix.
double | v | vertical translation component of the new text matrix.

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### Concat(Matrix2D)

##### Declaration

    public void Concat(Matrix2D mtx)

##### Parameters

Type | Name | Description
--- | --- | ---
Matrix2D | mtx |

#### GetAISFlag()

Gets the aIS flag.

##### Declaration

    public bool GetAISFlag()

##### Returns

Type | Description
--- | ---
bool | the alpha source flag ('alpha is shape'), specifying whether the current soft mask and alpha constant are to be interpreted as shape values (true) or opacity values (false).

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### GetAutoStrokeAdjust()

Gets the auto stroke adjust.

##### Declaration

    public bool GetAutoStrokeAdjust()

##### Returns

Type | Description
--- | ---
bool | a flag specifying whether stroke adjustment is enabled in the graphics state. Corresponds to the /SA key within the ExtGState's dictionary.

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### GetBlackGenFunct()

Gets the black gen funct.

##### Declaration

    public Obj GetBlackGenFunct()

##### Returns

Type | Description
--- | ---
Obj | currently selected black-generation function (NULL by default) used during conversion between DeviceRGB and DeviceCMYK. Corresponds to the /BG key within the ExtGState's dictionary.

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### GetBlendMode()

Gets the blend mode.

##### Declaration

    public GState.BlendMode GetBlendMode()

##### Returns

Type | Description
--- | ---
GState.BlendMode | the current blend mode to be used in the transparent imaging model. Corresponds to the /BM key within the ExtGState's dictionary.

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### GetCharSpacing()

Gets the char spacing.

##### Declaration

    public double GetCharSpacing()

##### Returns

Type | Description
--- | ---
double | currently selected character spacing. The character spacing parameter is a number specified in unscaled text space units. When the glyph for each character in the string is rendered, the character spacing is added to the horizontal or vertical component of the glyph's displacement, depending on the writing mode. See Section 5.2.1 in PDF Reference Manual for details.

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### GetDashes()

Gets the dashes.

##### Declaration

    public double[] GetDashes()

##### Returns

Type | Description
--- | ---
double[] | The method fills the vector with an array of numbers representing the dash pattern The line dash pattern controls the pattern of dashes and gaps used to stroke paths. It is specified by a dash array and a dash phase. The dash array's elements are numbers that specify the lengths of alternating dashes and gaps; the dash phase specifies the distance into the dash pattern at which to start the dash. The elements of both the dash array and the dash phase are expressed in user space units.

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### GetFillColor()

Gets the fill color space.

##### Declaration

    public ColorPt GetFillColor()

##### Returns

Type | Description
--- | ---
ColorPt | color space used for filling

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### GetFillColorSpace()

Gets the fill color.

##### Declaration

    public ColorSpace GetFillColorSpace()

##### Returns

Type | Description
--- | ---
ColorSpace | a color value/point represented in the current fill color space

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### GetFillOpacity()

Gets the fill opacity.

##### Declaration

    public double GetFillOpacity()

##### Returns

Type | Description
--- | ---
double | the opacity value for painting operations other than stroking. Returns the value of the /ca key in the ExtGState dictionary. If the value is not found, the default value of 1 is returned.

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### GetFillOverprint()

Gets the fill overprint.

##### Declaration

    public bool GetFillOverprint()

##### Returns

Type | Description
--- | ---
bool | whether overprint is enabled for fill painting operations. Corresponds to the /op key within the ExtGState's dictionary.

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### GetFillPattern()

Gets the fill pattern.

##### Declaration

    public PatternColor GetFillPattern()

##### Returns

Type | Description
--- | ---
PatternColor | the SDF pattern object of currently selected PatternColorSpace used for filling.

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### GetFlatness()

Gets the flatness.

##### Declaration

    public double GetFlatness()

##### Returns

Type | Description
--- | ---
double | current value of flatness tolerance Flatness is a number in the range 0 to 100; a value of 0 specifies the output device's default flatness tolerance. The flatness tolerance controls the maximum permitted distance in device pixels between the mathematically correct path and an approximation constructed from straight line segments.

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### GetFont()

Gets the font.

##### Declaration

    public Font GetFont()

##### Returns

Type | Description
--- | ---
Font | currently selected font

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### GetFontSize()

Gets the font size.

##### Declaration

    public double GetFontSize()

##### Returns

Type | Description
--- | ---
double | the font size

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### GetHalftone()

Gets the halftone.

##### Declaration

    public Obj GetHalftone()

##### Returns

Type | Description
--- | ---
Obj | currently selected halftone dictionary or stream (NULL by default). Corresponds to the /HT key within the ExtGState's dictionary. Halftoning is a process by which continuous-tone colors are approximated on an output device that can achieve only a limited number of discrete colors.

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### GetHorizontalScale()

Gets the horizontal scale.

##### Declaration

    public double GetHorizontalScale()

##### Returns

Type | Description
--- | ---
double | currently selected horizontal scale The horizontal scaling parameter adjusts the width of glyphs by stretching or compressing them in the horizontal direction. Its value is specified as a percentage of the normal width of the glyphs, with 100 being the normal width. The scaling always applies to the horizontal coordinate in text space, independently of the writing mode. See Section 5.2.3 in PDF Reference Manual for details.

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### GetLeading()

Gets the leading.

##### Declaration

    public double GetLeading()

##### Returns

Type | Description
--- | ---
double | currently selected leading parameter The leading parameter is measured in unscaled text space units. It specifies the vertical distance between the baselines of adjacent lines of text. See Section 5.2.4 in PDF Reference Manual for details.

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### GetLineCap()

Gets the line cap.

##### Declaration

    public GState.LineCap GetLineCap()

##### Returns

Type | Description
--- | ---
GState.LineCap | currently selected LineCap style The line cap style specifies the shape to be used at the ends of open subpaths (and dashes, if any) when they are stroked.

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### GetLineJoin()

Gets the line join.

##### Declaration

    public GState.LineJoin GetLineJoin()

##### Returns

Type | Description
--- | ---
GState.LineJoin | currently selected LineJoin style The line join style specifies the shape to be used at the corners of paths that are stroked.

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### GetLineWidth()

Gets the line width.

##### Declaration

    public double GetLineWidth()

##### Returns

Type | Description
--- | ---
double | the thickness of the line used to stroke a path.

##### Remarks

A line width of 0 denotes the thinnest line that can be rendered at device

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### GetMiterLimit()

Gets the miter limit.

##### Declaration

    public double GetMiterLimit()

##### Returns

Type | Description
--- | ---
double | current value of miter limit. The miter limit imposes a maximum on the ratio of the miter length to the line width. When the limit is exceeded, the join is converted from a miter to a bevel.

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### GetOverprintMode()

Gets the overprint mode.

##### Declaration

    public int GetOverprintMode()

##### Returns

Type | Description
--- | ---
int | the overprint mode used by this graphics state. Corresponds to the /OPM key within the ExtGState's dictionary.

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### GetPhase()

Gets the phase.

##### Declaration

    public double GetPhase()

##### Returns

Type | Description
--- | ---
double | the phase of the currently selected dash pattern. dash phase is expressed in user space units.

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### GetRenderingIntent()

Gets the rendering intent.

##### Declaration

    public GState.RenderingIntent GetRenderingIntent()

##### Returns

Type | Description
--- | ---
GState.RenderingIntent | The color intent to be used for rendering the Element

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### GetRenderingIntentType(string)

A utility function that maps a string representing a rendering intent to RenderingIntent type.

##### Declaration

    public static GState.RenderingIntent GetRenderingIntentType(string name)

##### Parameters

Type | Name | Description
--- | --- | ---
string | name | the name

##### Returns

Type | Description
--- | ---
GState.RenderingIntent | The color rendering intent type matching the specified string

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### GetSmoothnessTolerance()

Gets the smoothness tolerance.

##### Declaration

    public double GetSmoothnessTolerance()

##### Returns

Type | Description
--- | ---
double | the smoothness tolerance used to control the quality of smooth shading. Corresponds to the /SM key within the ExtGState's dictionary. The allowable error (or tolerance) is expressed as a fraction of the range of the color component, from 0.0 to 1.0.

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### GetSoftMask()

Gets the soft mask.

##### Declaration

    public Obj GetSoftMask()

##### Returns

Type | Description
--- | ---
Obj | Associated soft mask. NULL if the soft mask is not selected or SDF dictionary representing the soft mask otherwise.

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### GetSoftMaskTransform()

Gets the soft mask transform.

##### Declaration

    public Matrix2D GetSoftMaskTransform()

##### Returns

Type | Description
--- | ---
Matrix2D | The soft mask transform. This is the transformation matrix at the moment the soft mask is established in the graphics state with the gs operator. This information is only relevant when applying the soft mask that may be specified in the graphics state to the current element.

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### GetStrokeColor()

Gets the stroke color space.

##### Declaration

    public ColorPt GetStrokeColor()

##### Returns

Type | Description
--- | ---
ColorPt | color space used for stroking

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### GetStrokeColorSpace()

Gets the stroke color.

##### Declaration

    public ColorSpace GetStrokeColorSpace()

##### Returns

Type | Description
--- | ---
ColorSpace | a color value/point represented in the current stroke color space

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### GetStrokeOpacity()

Gets the stroke opacity.

##### Declaration

    public double GetStrokeOpacity()

##### Returns

Type | Description
--- | ---
double | opacity value for stroke painting operations for paths and glyph outlines. Returns the value of the /CA key in the ExtGState dictionary. If the value is not found, the default value of 1 is returned.

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### GetStrokeOverprint()

Gets the stroke overprint.

##### Declaration

    public bool GetStrokeOverprint()

##### Returns

Type | Description
--- | ---
bool | whether overprint is enabled for stroke painting operations. Corresponds to the /OP key within the ExtGState's dictionary.

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### GetStrokePattern()

Gets the stroke pattern.

##### Declaration

    public PatternColor GetStrokePattern()

##### Returns

Type | Description
--- | ---
PatternColor | the SDF pattern object of currently selected PatternColorSpace used for stroking.

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### GetTextRenderMode()

Gets the text render mode.

##### Declaration

    public GState.TextRenderingMode GetTextRenderMode()

##### Returns

Type | Description
--- | ---
GState.TextRenderingMode | current text rendering mode. The text rendering mode determines whether showing text causes glyph outlines to be stroked, filled, used as a clipping boundary, or some combination of the three. See Section 5.2.5 in PDF Reference Manual for details..

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### GetTextRise()

Gets the text rise.

##### Declaration

    public double GetTextRise()

##### Returns

Type | Description
--- | ---
double | current value of text rise Text rise specifies the distance, in unscaled text space units, to move the baseline up or down from its default location. Positive values of text rise move the baseline up

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### GetTransferFunct()

Gets the transfer funct.

##### Declaration

    public Obj GetTransferFunct()

##### Returns

Type | Description
--- | ---
Obj | currently selected transfer function (NULL by default) used during color conversion process. A transfer function adjusts the values of color components to compensate for nonlinear response in an output device and in the human eye. Corresponds to the /TR key within the ExtGState's dictionary.

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### GetTransform()

Gets the transform.

##### Declaration

    public Matrix2D GetTransform()

##### Returns

Type | Description
--- | ---
Matrix2D | the transformation matrix for this element.

##### Remarks

If you are looking for a matrix that maps coordinates to the initial user space see Element::GetCTM().

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### GetUCRFunct()

Gets the uCR funct.

##### Declaration

    public Obj GetUCRFunct()

##### Returns

Type | Description
--- | ---
Obj | currently selected undercolor-removal function (NULL by default) used during conversion between DeviceRGB and DeviceCMYK. Corresponds to the /UCR key within the ExtGState's dictionary.

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### GetWordSpacing()

Gets the word spacing.

##### Declaration

    public double GetWordSpacing()

##### Returns

Type | Description
--- | ---
double | currently selected word spacing Word spacing works the same way as character spacing, but applies only to the space character (char code 32). See Section 5.2.2 in PDF Reference Manual for details.

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### IsTextKnockout()

Checks if is text knockout.

##### Declaration

    public bool IsTextKnockout()

##### Returns

Type | Description
--- | ---
bool | a boolean flag that determines the text element is considered elementary objects for purposes of color compositing in the transparent imaging model.

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### SetAISFlag(bool)

Specifies if the alpha is to be interpreted as a shape or opacity mask. The alpha source flag ('alpha is shape'), specifies whether the current soft mask and alpha constant are to be interpreted as shape values (true) or opacity values (false).

##### Declaration

    public void SetAISFlag(bool AIS)

##### Parameters

Type | Name | Description
--- | --- | ---
bool | AIS | the new aIS flag

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### SetAutoStrokeAdjust(bool)

Specify whether to apply automatic stroke adjustment. Corresponds to the /SA key within the ExtGState's dictionary.

##### Declaration

    public void SetAutoStrokeAdjust(bool SA)

##### Parameters

Type | Name | Description
--- | --- | ---
bool | SA | the new auto stroke adjust

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### SetBlackGenFunct(Obj)

Sets black-generation function used during conversion between DeviceRGB and DeviceCMYK. Corresponds to the /BG key within the ExtGState's dictionary.

##### Declaration

    public void SetBlackGenFunct(Obj BG)

##### Parameters

Type | Name | Description
--- | --- | ---
Obj | BG | SDF/Cos black-generation function or name

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### SetBlendMode(BlendMode)

Gets the blend mode.

##### Declaration

    public void SetBlendMode(GState.BlendMode BM)

##### Parameters

Type | Name | Description
--- | --- | ---
GState.BlendMode | BM | New blending mode type.

##### Examples

    // C#
    gs.SetBlendMode(GState.BlendMode.e_lighten);

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception
PDFNetException | PDFNetException the PDFNet exception

#### SetCharSpacing(double)

Sets character spacing.

##### Declaration

    public void SetCharSpacing(double char_spacing)

##### Parameters

Type | Name | Description
--- | --- | ---
double | char_spacing | a number specified in unscaled text space units. When the glyph for each character in the string is rendered, the character spacing is added to the horizontal or vertical component of the glyph's displacement, depending on the writing mode. See Section 5.2.1 in PDF Reference Manual for details.

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### SetDashPattern(double[], double)

Sets the dash pattern used to stroke paths.

The line dash pattern controls the pattern of dashes and gaps used to stroke paths. It is specified by a dash array and a dash phase. The dash array's elements are numbers that specify the lengths of alternating dashes and gaps; the dash phase specifies the distance into the dash pattern at which to start the dash. The elements of both the dash array and the dash phase are expressed in user space units.

##### Declaration

    public void SetDashPattern(double[] dash_array, double phase)

##### Parameters

Type | Name | Description
--- | --- | ---
double[] | dash_array | the dash_array
double | phase | the phase

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### SetFillColor(ColorPt)

##### Declaration

    public void SetFillColor(ColorPt c)

##### Parameters

Type | Name | Description
--- | --- | ---
ColorPt | c |

#### SetFillColor(PatternColor)

Set the fill color to the given tiling pattern.

##### Declaration

    public void SetFillColor(PatternColor pattern)

##### Parameters

Type | Name | Description
--- | --- | ---
PatternColor | pattern | SDF pattern object.

##### Remarks

The currently selected fill color space must be Pattern color space.

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### SetFillColor(PatternColor, ColorPt)

##### Declaration

    public void SetFillColor(PatternColor pattern, ColorPt c)

##### Parameters

Type | Name | Description
--- | --- | ---
PatternColor | pattern |
ColorPt | c |

#### SetFillColorSpace(ColorSpace)

Sets the color space used for filling operations.

##### Declaration

    public void SetFillColorSpace(ColorSpace cs)

##### Parameters

Type | Name | Description
--- | --- | ---
ColorSpace | cs | the new fill color space

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### SetFillOpacity(double)

Sets the opacity value for painting operations other than stroking. Corresponds to the value of the /ca key in the ExtGState dictionary.

##### Declaration

    public void SetFillOpacity(double ca)

##### Parameters

Type | Name | Description
--- | --- | ---
double | ca | the new fill opacity

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### SetFillOverprint(bool)

Specifies if overprint is enabled for fill operations. Corresponds to the /op key within the ExtGState's dictionary.

##### Declaration

    public void SetFillOverprint(bool op)

##### Parameters

Type | Name | Description
--- | --- | ---
bool | op | the new fill overprint

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### SetFlatness(double)

Sets the value of flatness tolerance.

##### Declaration

    public void SetFlatness(double flatness)

##### Parameters

Type | Name | Description
--- | --- | ---
double | flatness | is a number in the range 0 to 100; a value of 0 specifies the output device's default flatness tolerance. The flatness tolerance controls the maximum permitted distance in device pixels between the mathematically correct path and an approximation constructed from straight line segments.

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### SetFont(Font, double)

Sets the font and font size used to draw text.

##### Declaration

    public void SetFont(Font font, double font_sz)

##### Parameters

Type | Name | Description
--- | --- | ---
Font | font | the font
double | font_sz | the font_sz

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### SetHalftone(Obj)

Sets the halftone.

##### Declaration

    public void SetHalftone(Obj HT)

##### Parameters

Type | Name | Description
--- | --- | ---
Obj | HT | SDF/Cos halftone dictionary, stream, or name

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### SetHorizontalScale(double)

Sets horizontal scale. The horizontal scaling parameter adjusts the width of glyphs by stretching or compressing them in the horizontal direction. Its value is specified as a percentage of the normal width of the glyphs, with 100 being the normal width. The scaling always applies to the horizontal coordinate in text space, independently of the writing mode. See Section 5.2.3 in PDF Reference Manual for details.

##### Declaration

    public void SetHorizontalScale(double hscale)

##### Parameters

Type | Name | Description
--- | --- | ---
double | hscale | the new horizontal scale

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### SetLeading(double)

Sets the leading parameter.

The leading parameter is measured in unscaled text space units. It specifies the vertical distance between the baselines of adjacent lines of text. See Section 5.2.4 in PDF Reference Manual for details.

##### Declaration

    public void SetLeading(double leading)

##### Parameters

Type | Name | Description
--- | --- | ---
double | leading | the new leading

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### SetLineCap(LineCap)

Sets LineCap style property. The line cap style specifies the shape to be used at the ends of open subpaths (and dashes, if any) when they are stroked.

##### Declaration

    public void SetLineCap(GState.LineCap cap)

##### Parameters

Type | Name | Description
--- | --- | ---
GState.LineCap | cap | the new line cap

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### SetLineJoin(LineJoin)

Sets LineJoin style property.

The line join style specifies the shape to be used at the corners of paths that are stroked.

##### Declaration

    public void SetLineJoin(GState.LineJoin join)

##### Parameters

Type | Name | Description
--- | --- | ---
GState.LineJoin | join | the new line join

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### SetLineWidth(double)

Sets the thickness of the line used to stroke a path.

##### Declaration

    public void SetLineWidth(double width)

##### Parameters

Type | Name | Description
--- | --- | ---
double | width | a non-negative number expressed in user space units. A line width of 0 denotes the thinnest line that can be rendered at device resolution: 1 device pixel wide.

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### SetMiterLimit(double)

Sets miter limit.

##### Declaration

    public void SetMiterLimit(double miter_limit)

##### Parameters

Type | Name | Description
--- | --- | ---
double | miter_limit | A number that imposes a maximum on the ratio of the miter length to the line width. When the limit is exceeded, the join is converted from a miter to a bevel.

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### SetOverprintMode(int)

Sets the overprint mode. Corresponds to the /OPM key within the ExtGState's dictionary.

##### Declaration

    public void SetOverprintMode(int OPM)

##### Parameters

Type | Name | Description
--- | --- | ---
int | OPM | the new overprint mode

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### SetRenderingIntent(RenderingIntent)

Sets the color intent to be used for rendering the Element.

##### Declaration

    public void SetRenderingIntent(GState.RenderingIntent intent)

##### Parameters

Type | Name | Description
--- | --- | ---
GState.RenderingIntent | intent | the new rendering intent

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### SetSmoothnessTolerance(double)

Sets the smoothness tolerance used to control the quality of smooth shading. Corresponds to the /SM key within the ExtGState's dictionary.

##### Declaration

    public void SetSmoothnessTolerance(double SM)

##### Parameters

Type | Name | Description
--- | --- | ---
double | SM | the new smoothness tolerance

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### SetSoftMask(Obj)

Sets the soft mask of the extended graphics state. Corresponds to the /SMask key within the ExtGState's dictionary.

##### Declaration

    public void SetSoftMask(Obj SM)

##### Parameters

Type | Name | Description
--- | --- | ---
Obj | SM | the new soft mask

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### SetStrokeColor(ColorPt)

##### Declaration

    public void SetStrokeColor(ColorPt c)

##### Parameters

Type | Name | Description
--- | --- | ---
ColorPt | c |

#### SetStrokeColor(PatternColor)

Set the stroke color to the given tiling pattern.

##### Declaration

    public void SetStrokeColor(PatternColor pattern)

##### Parameters

Type | Name | Description
--- | --- | ---
PatternColor | pattern | SDF pattern object.

##### Remarks

The currently selected stroke color space must be Pattern color space.

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### SetStrokeColor(PatternColor, ColorPt)

##### Declaration

    public void SetStrokeColor(PatternColor pattern, ColorPt c)

##### Parameters

Type | Name | Description
--- | --- | ---
PatternColor | pattern |
ColorPt | c |

#### SetStrokeColorSpace(ColorSpace)

Sets the color space used for stroking operations.

##### Declaration

    public void SetStrokeColorSpace(ColorSpace cs)

##### Parameters

Type | Name | Description
--- | --- | ---
ColorSpace | cs | the new stroke color space

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### SetStrokeOpacity(double)

Sets opacity value for stroke painting operations for paths and glyph outlines. Corresponds to the value of the /CA key in the ExtGState dictionary.

##### Declaration

    public void SetStrokeOpacity(double CA)

##### Parameters

Type | Name | Description
--- | --- | ---
double | CA | the new stroke opacity

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### SetStrokeOverprint(bool)

Specifies if overprint is enabled for stroke operations. Corresponds to the /OP key within the ExtGState's dictionary.

##### Declaration

    public void SetStrokeOverprint(bool OP)

##### Parameters

Type | Name | Description
--- | --- | ---
bool | OP | the new stroke overprint

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### SetTextKnockout(bool)

Mark the object as elementary for purposes of color compositing in the transparent imaging model.

##### Declaration

    public void SetTextKnockout(bool knockout)

##### Parameters

Type | Name | Description
--- | --- | ---
bool | knockout | the new text knockout

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### SetTextRenderMode(TextRenderingMode)

Sets text rendering mode. The text rendering mode determines whether showing text causes glyph outlines to be stroked, filled, used as a clipping boundary, or some combination of the three. See Section 5.2.5 in PDF Reference Manual for details..

##### Declaration

    public void SetTextRenderMode(GState.TextRenderingMode rmode)

##### Parameters

Type | Name | Description
--- | --- | ---
GState.TextRenderingMode | rmode | the new text render mode

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### SetTextRise(double)

Sets text rise. Text rise specifies the distance, in unscaled text space units, to move the baseline up or down from its default location. Positive values of text rise move the baseline up

##### Declaration

    public void SetTextRise(double rise)

##### Parameters

Type | Name | Description
--- | --- | ---
double | rise | the new text rise

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### SetTransferFunct(Obj)

Sets transfer function used during color conversion process. A transfer function adjusts the values of color components to compensate for nonlinear response in an output device and in the human eye. Corresponds to the /TR key within the ExtGState's dictionary.

##### Declaration

    public void SetTransferFunct(Obj TR)

##### Parameters

Type | Name | Description
--- | --- | ---
Obj | TR | SDF/Cos transfer function, array, or name

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### SetTransform(double, double, double, double, double, double)

Sets the transformation matrix for this element. This method accepts text transformation matrix components directly.

A transformation matrix in PDF is specified by six numbers, usually in the form of an array containing six elements. In its most general form, this array is denoted [a b c d h v]; it can represent any linear transformation from one coordinate system to another. For more information about PDF matrices please refer to section 4.2.2 'Common Transformations' in PDF Reference Manual, and to documentation for pdftron::Common::Matrix2D class.

##### Declaration

    public void SetTransform(double a, double b, double c, double d, double h, double v)

##### Parameters

Type | Name | Description
--- | --- | ---
double | a | horizontal 'scaling' component of the new text matrix.
double | b | 'rotation' component of the new text matrix.
double | c | 'rotation' component of the new text matrix.
double | d | vertical 'scaling' component of the new text matrix.
double | h | horizontal translation component of the new text matrix.
double | v | vertical translation component of the new text matrix.

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### SetTransform(Matrix2D)

##### Declaration

    public void SetTransform(Matrix2D mtx)

##### Parameters

Type | Name | Description
--- | --- | ---
Matrix2D | mtx |

#### SetUCRFunct(Obj)

Sets undercolor-removal function used during conversion between DeviceRGB and DeviceCMYK. Corresponds to the /UCR key within the ExtGState's dictionary.

##### Declaration

    public void SetUCRFunct(Obj UCR)

##### Parameters

Type | Name | Description
--- | --- | ---
Obj | UCR | SDF/Cos undercolor-removal function or name

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### SetWordSpacing(double)

Sets word spacing.

##### Declaration

    public void SetWordSpacing(double word_spacing)

##### Parameters

Type | Name | Description
--- | --- | ---
double | word_spacing | a number specified in unscaled text space units. Word spacing works the same way as character spacing, but applies only to the space character (char code 32). See Section 5.2.2 in PDF Reference Manual for details.

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception