Public Member Functions | |
GraphState (float line_width, int line_join, float miter_limit, int line_cap, float dash_phase, FloatArray dashes) | |
Constructor, with parameters. More... | |
GraphState () | |
Constructor. | |
GraphState (GraphState state) | |
Constructor, with another GraphState object. More... | |
float | getDash_phase () |
Get dash phase for dash pattern. More... | |
FloatArray | getDashes () |
Get a dash array that represents the dash patterns. More... | |
int | getLine_cap () |
Get line cap style. More... | |
int | getLine_join () |
Get line join style. More... | |
float | getLine_width () |
Get line width. More... | |
float | getMiter_limit () |
Get the miter limit for line join. More... | |
void | set (float line_width, int line_join, float miter_limit, int line_cap, float dash_phase, FloatArray dashes) |
Set value. More... | |
void | setDash_phase (float value) |
Set dash phase for dash pattern. More... | |
void | setDashes (FloatArray value) |
Set a dash array that represents the dash patterns. More... | |
void | setLine_cap (int value) |
Set line cap style. More... | |
void | setLine_join (int value) |
Set line join style. More... | |
void | setLine_width (float value) |
Set line width. More... | |
void | setMiter_limit (float value) |
Set the miter limit for line join. More... | |
Static Public Attributes | |
static final int | e_LineCapButt = 0 |
Butt cap. The stroke is squared off at the endpoint of a path. There is no projection beyond the end of a path. | |
static final int | e_LineCapRound = 1 |
Round cap. A semicircular arc with a diameter equal to the line width is drawn around the endpoint and filled in. | |
static final int | e_LineCapSquare = 2 |
Projecting square cap. The stroke continues beyond the endpoint of the path for a distance equal to half the line width and is squared off. | |
static final int | e_LineJoinBevel = 2 |
Bevel line join type. More... | |
static final int | e_LineJoinMiter = 0 |
Miter line join type. More... | |
static final int | e_LineJoinRound = 1 |
Round line join type. More... | |
This class represents PDF graph states.
com.foxit.sdk.common.GraphState.GraphState | ( | float | line_width, |
int | line_join, | ||
float | miter_limit, | ||
int | line_cap, | ||
float | dash_phase, | ||
FloatArray | dashes | ||
) |
Constructor, with parameters.
line_width | Line width. If 0 is set to this, it will be treated as 1 by default. |
line_join | Line join style. Please refer to values starting from e_LineJoinMiter and this should be one of these values. |
miter_limit | The miter limit for line join. |
line_cap | Line cap style. Please refer to values starting from e_LineCapButt and this should be one of these values. |
dash_phase | Dash phase for line dash pattern. |
dashes | A dash array that represents the dash patterns. The value of each element in this array should not be negative. |
com.foxit.sdk.common.GraphState.GraphState | ( | GraphState | state | ) |
Constructor, with another GraphState object.
state | Another GraphState object. |
com.foxit.sdk.common.GraphState.getDash_phase | ( | ) |
Get dash phase for dash pattern.
com.foxit.sdk.common.GraphState.getDashes | ( | ) |
Get a dash array that represents the dash patterns.
com.foxit.sdk.common.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 e_LineCapButt and this should be one of these values.
com.foxit.sdk.common.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 e_LineJoinMiter and this should be one of these values.
com.foxit.sdk.common.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.
com.foxit.sdk.common.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.
void com.foxit.sdk.common.GraphState.set | ( | float | line_width, |
int | line_join, | ||
float | miter_limit, | ||
int | line_cap, | ||
float | dash_phase, | ||
FloatArray | dashes | ||
) |
Set value.
line_width | Line width. If 0 is set to this, it will be treated as 1 by default. |
line_join | Line join style. Please refer to values starting from e_LineJoinMiter and this should be one of these values. |
miter_limit | The miter limit for line join. |
line_cap | Line cap style. Please refer to values starting from e_LineCapButt and this should be one of these values. |
dash_phase | Dash phase for line dash pattern. |
dashes | A dash array that represents the dash patterns. The value of each element in this array should not be negative. |
com.foxit.sdk.common.GraphState.setDash_phase | ( | float | value | ) |
Set dash phase for dash pattern.
[in] | dash_phase | Dash phase for dash pattern. |
com.foxit.sdk.common.GraphState.setDashes | ( | FloatArray | value | ) |
Set a dash array that represents the dash patterns.
[in] | dashes | A dash array that represents the dash patterns. Value of each element in this array should not be negative. |
com.foxit.sdk.common.GraphState.setLine_cap | ( | int | 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 e_LineCapButt and this should be one of these values.
[in] | line_cap | Line cap style. |
com.foxit.sdk.common.GraphState.setLine_join | ( | int | 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 e_LineJoinMiter and this should be one of these values.
[in] | line_join | Line join style. |
com.foxit.sdk.common.GraphState.setLine_width | ( | float | 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.
[in] | line_width | Line width. |
com.foxit.sdk.common.GraphState.setMiter_limit | ( | float | 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.
[in] | miter_limit | The miter limit for line join. |
|
static |
Bevel line join type.
The two segments are finished with butt caps and the resulting notch beyond the end of the segments is filled with a triangle.
|
static |
Miter line join type.
The outer edges of the strokes for the two segments are extended until they meet at an angle.
|
static |
Round line join type.
An arc of a circle with a diameter equal to the line width is drawn around the point where the two segments meet, connecting the outer edges of the strokes for the two segments.