SetDash
Inheritance: java.lang.Object, com.aspose.pdf.Operator
public class SetDash extends Operator
Class representing d operator (set line dash pattern).
Constructors
Constructor | Description |
---|---|
SetDash(int index, ICommand command) | Constructor for operator class. |
SetDash(int[] pattern, int phase) | Creates set dash pattern operator. |
Methods
Method | Description |
---|---|
getPattern() | Dash pattern. |
setPattern(int[] value) | Dash pattern. |
getPhase() | Dash phase. |
setPhase(int value) | Dash phase. |
accept(IOperatorSelector visitor) | Accepts visitor object to process operator. |
toString() | Gets operator string representation. |
fromCommand(ICommand command) | |
toCommand() |
SetDash(int index, ICommand command)
public SetDash(int index, ICommand command)
Constructor for operator class.
Parameters:
Parameter | Type | Description |
---|---|---|
index | int | Index of operator. |
command | ICommand | Operator command. |
SetDash(int[] pattern, int phase)
public SetDash(int[] pattern, int phase)
Creates set dash pattern operator.
Parameters:
Parameter | Type | Description |
---|---|---|
pattern | int[] | Array which defines dash pattern. |
phase | int | Dash phase. |
getPattern()
public int[] getPattern()
Dash pattern. Array’s elements shall be numbers that specify the lengths of alternating dashes and gaps. In case of one element array dash and gap lengths are equal.
Returns: int[] - int array
setPattern(int[] value)
public void setPattern(int[] value)
Dash pattern. Array’s elements shall be numbers that specify the lengths of alternating dashes and gaps. In case of one element array dash and gap lengths are equal.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int[] | int array |
getPhase()
public int getPhase()
Dash phase. Before beginning to stroke a path, the dash array shall be cycled through, adding up the lengths of dashes and gaps. When the accumulated length equals the value specified by the dash phase, stroking of the path shall begin, and the dash array shall be used cyclically from that point onward.
Returns: int - int value
setPhase(int value)
public void setPhase(int value)
Dash phase. Before beginning to stroke a path, the dash array shall be cycled through, adding up the lengths of dashes and gaps. When the accumulated length equals the value specified by the dash phase, stroking of the path shall begin, and the dash array shall be used cyclically from that point onward.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int | int value |
accept(IOperatorSelector visitor)
public void accept(IOperatorSelector visitor)
Accepts visitor object to process operator.
Parameters:
Parameter | Type | Description |
---|---|---|
visitor | IOperatorSelector | Visitor object. |
toString()
public String toString()
Gets operator string representation.
Returns: java.lang.String - [x1 x2] y d, where x1 - dash length, x2 - gap length, y - phase.
fromCommand(ICommand command)
public void fromCommand(ICommand command)
Parameters:
Parameter | Type | Description |
---|---|---|
command | ICommand |
toCommand()
public ICommand toCommand()
Returns: ICommand