Foxit PDF SDK
fsdk.GraphState Class Reference

Public Member Functions

def GetDash_phase ()
 Get dash phase for dash pattern. More...
 
def GetDashes ()
 Get a dash array that represents the dash patterns. More...
 
def GetLine_cap ()
 Get line cap style. More...
 
def GetLine_join ()
 Get line join style. More...
 
def GetLine_width ()
 Get line width. More...
 
def GetMiter_limit ()
 Get the miter limit for line join. More...
 
def Set (line_width, line_join, miter_limit, line_cap, dash_phase, dashes)
 Set value. More...
 
def SetDash_phase (value)
 Set dash phase for dash pattern. More...
 
def SetDashes (value)
 Set a dash array that represents the dash patterns. More...
 
def SetLine_cap (value)
 Set line cap style. More...
 
def SetLine_join (value)
 Set line join style. More...
 
def SetLine_width (value)
 Set line width. More...
 
def SetMiter_limit (value)
 Set the miter limit for line join. More...
 

Detailed Description

This class represents PDF graph states.

Member Function Documentation

◆ GetDash_phase()

fsdk.GraphState.GetDash_phase ( )

Get dash phase for dash pattern.

Returns
Dash phase for dash pattern.

◆ GetDashes()

fsdk.GraphState.GetDashes ( )

Get a dash array that represents the dash patterns.

Returns
A dash array that represents the dash patterns. Value of each element in this array should not be negative.

◆ GetLine_cap()

fsdk.GraphState.GetLine_cap ( )

Get line cap style.

The line cap style specifies the shape to be used at the ends of open sub-paths (and dashes, if any) when they are stroked. Please refer to values starting from fsdk.GraphStateE_LineCapButt and this should be one of these values.

Returns
Line cap style.

◆ GetLine_join()

fsdk.GraphState.GetLine_join ( )

Get line join style.

The line join style specifies the shape to be used at the corners of paths that are stroked. Please refer to values starting from fsdk.GraphStateE_LineJoinMiter and this should be one of these values.

Returns
Line join style.

◆ GetLine_width()

fsdk.GraphState.GetLine_width ( )

Get line width.

It should be a non-negative number in [PDF coordinate system] (). If 0 is set to this, it will be treated as 1 by default.

Returns
Line width.

◆ GetMiter_limit()

fsdk.GraphState.GetMiter_limit ( )

Get the miter limit for line join.

When two line segments meet at a sharp angle and mitered joins have been specified as the line join style, it is possible for the miter to extend far beyond the thickness of the line stroking the path. 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.
Please refer to <PDF Reference 1.7> P217 "Miter Limit" for more details.

Returns
The miter limit for line join.

◆ Set()

def fsdk.GraphState.Set (   line_width,
  line_join,
  miter_limit,
  line_cap,
  dash_phase,
  dashes 
)

Set value.

Parameters
[in]line_widthLine width. If 0 is set to this, it will be treated as 1 by default.
[in]line_joinLine join style. Please refer to values starting from fsdk.GraphStateE_LineJoinMiter and this should be one of these values.
[in]miter_limitThe miter limit for line join.
[in]line_capLine cap style. Please refer to values starting from fsdk.GraphStateE_LineCapButt and this should be one of these values.
[in]dash_phaseDash phase for line dash pattern.
[in]dashesA dash array that represents the dash patterns. The value of each element in this array should not be negative.
Returns
None.

◆ SetDash_phase()

fsdk.GraphState.SetDash_phase (   value)

Set dash phase for dash pattern.

Parameters
[in]valueDash phase for dash pattern.
Returns
None.

◆ SetDashes()

fsdk.GraphState.SetDashes (   value)

Set a dash array that represents the dash patterns.

Parameters
[in]valueA dash array that represents the dash patterns. Value of each element in this array should not be negative.
Returns
None.

◆ SetLine_cap()

fsdk.GraphState.SetLine_cap (   value)

Set line cap style.

The line cap style specifies the shape to be used at the ends of open sub-paths (and dashes, if any) when they are stroked. Please refer to values starting from fsdk.GraphStateE_LineCapButt and this should be one of these values.

Parameters
[in]valueLine cap style.
Returns
None.

◆ SetLine_join()

fsdk.GraphState.SetLine_join (   value)

Set line join style.

The line join style specifies the shape to be used at the corners of paths that are stroked. Please refer to values starting from fsdk.GraphStateE_LineJoinMiter and this should be one of these values.

Parameters
[in]valueLine join style.
Returns
None.

◆ SetLine_width()

fsdk.GraphState.SetLine_width (   value)

Set line width.

It should be a non-negative number in [PDF coordinate system] (). If 0 is set to this, it will be treated as 1 by default.

Parameters
[in]valueLine width.
Returns
None.

◆ SetMiter_limit()

fsdk.GraphState.SetMiter_limit (   value)

Set the miter limit for line join.

When two line segments meet at a sharp angle and mitered joins have been specified as the line join style, it is possible for the miter to extend far beyond the thickness of the line stroking the path. 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.
Please refer to <PDF Reference 1.7> P217 "Miter Limit" for more details.

Parameters
[in]valueThe miter limit for line join.
Returns
None.