SetDash

Inheritance: java.lang.Object, com.aspose.pdf.Operator

public class SetDash extends Operator

Class representing d operator (set line dash pattern).

Constructors

ConstructorDescription
SetDash(int index, ICommand command)Constructor for operator class.
SetDash(int[] pattern, int phase)Creates set dash pattern operator.

Methods

MethodDescription
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:

ParameterTypeDescription
indexintIndex of operator.
commandICommandOperator command.

SetDash(int[] pattern, int phase)

public SetDash(int[] pattern, int phase)

Creates set dash pattern operator.

Parameters:

ParameterTypeDescription
patternint[]Array which defines dash pattern.
phaseintDash 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:

ParameterTypeDescription
valueint[]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:

ParameterTypeDescription
valueintint value

accept(IOperatorSelector visitor)

public void accept(IOperatorSelector visitor)

Accepts visitor object to process operator.

Parameters:

ParameterTypeDescription
visitorIOperatorSelectorVisitor 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:

ParameterTypeDescription
commandICommand

toCommand()

public ICommand toCommand()

Returns: ICommand