Foxit PDF SDK
FSGraphState Class Reference

Inherits NSObject.

Instance Methods

(id) - init
 Constructor.

 
(id) - initWithLine_width:line_join:miter_limit:line_cap:dash_phase:dashes:
 Constructor, with parameters.
More...
 
(id) - initWithState:
 Constructor, with another graph state object.
More...
 
(void) - set:line_join:miter_limit:line_cap:dash_phase:dashes:
 Set value.
More...
 

Properties

float dash_phase
 Dash phase for dash pattern.

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

 
FSGraphStateLineCapStyle line_cap
 Line cap style.
More...
 
FSGraphStateLineJoinStyle line_join
 Line join style.
More...
 
float line_width
 Line width.
More...
 
float miter_limit
 The miter limit for line join.
More...
 

Detailed Description

This class represents PDF graph states.

Method Documentation

◆ initWithLine_width:line_join:miter_limit:line_cap:dash_phase:dashes:()

- (id) initWithLine_width: (float)  line_width
line_join: (FSGraphStateLineJoinStyle line_join
miter_limit: (float)  miter_limit
line_cap: (FSGraphStateLineCapStyle line_cap
dash_phase: (float)  dash_phase
dashes: (FSFloatArray*)  dashes 

Constructor, with parameters.

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 FSGraphStateLineJoinMiter 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 FSGraphStateLineCapButt 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.

◆ initWithState:()

- (id) initWithState: (FSGraphState*)  state

Constructor, with another graph state object.

Parameters
[in]stateAnother graph state object.

◆ set:line_join:miter_limit:line_cap:dash_phase:dashes:()

- (void) set: (float)  line_width
line_join: (FSGraphStateLineJoinStyle line_join
miter_limit: (float)  miter_limit
line_cap: (FSGraphStateLineCapStyle line_cap
dash_phase: (float)  dash_phase
dashes: (FSFloatArray*)  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 FSGraphStateLineJoinMiter 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 FSGraphStateLineCapButt 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.

Property Documentation

◆ line_cap

- (FSGraphStateLineCapStyle) line_cap
readwritenonatomicassign

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 FSGraphStateLineCapButt and this should be one of these values.

◆ line_join

- (FSGraphStateLineJoinStyle) line_join
readwritenonatomicassign

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 FSGraphStateLineJoinMiter and this should be one of these values.

◆ line_width

- (float) line_width
readwritenonatomicassign

Line width.

It should be a non-negative number in . If 0 is set to this, it will be treated as 1 by default.

◆ miter_limit

- (float) miter_limit
readwritenonatomicassign

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.