Top Description Fields Constructors Methods
org.apache.pdfbox.pdmodel.graphics

public final Class PDLineDashPattern

extends Object
implements COSObjectable
Class Inheritance
All Implemented Interfaces
org.apache.pdfbox.pdmodel.common.COSObjectable
Imports
org.apache.pdfbox.cos.COSArray, .COSBase, .COSInteger, org.apache.pdfbox.pdmodel.common.COSObjectable, java.util.Arrays

A line dash pattern for stroking paths. Instances of PDLineDashPattern are immutable.
Authors
Ben Litchfield, John Hewson

Field Summary

Modifier and TypeField and Description
private final float[]
private final int

Constructor Summary

AccessConstructor and Description
public
PDLineDashPattern()

Creates a new line dash pattern, with no dashes and a phase of 0.

public
PDLineDashPattern(COSArray
the dash array
array
,
int
the phase
phase
)

Creates a new line dash pattern from a dash array and phase.

Method Summary

Modifier and TypeMethod and Description
public COSBase
getCOSObject()

Implements org.apache.pdfbox.pdmodel.common.COSObjectable.getCOSObject.

Convert this standard java object to a COS object.

public float[]

Returns:

the dash array, never null.
getDashArray
()

Returns the dash array.

public int

Returns:

the dash phase
getPhase
()

Returns the dash phase.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

arrayback to summary
private final float[] array
phaseback to summary
private final int phase

Constructor Detail

PDLineDashPatternback to summary
public PDLineDashPattern()

Creates a new line dash pattern, with no dashes and a phase of 0.

PDLineDashPatternback to summary
public PDLineDashPattern(COSArray array, int phase)

Creates a new line dash pattern from a dash array and phase.

Parameters
array:COSArray

the dash array

phase:int

the phase

Method Detail

getCOSObjectback to summary
public COSBase getCOSObject()

Implements org.apache.pdfbox.pdmodel.common.COSObjectable.getCOSObject.

Doc from org.apache.pdfbox.pdmodel.common.COSObjectable.getCOSObject.

Convert this standard java object to a COS object.

Returns:COSBase

The cos object that matches this Java object.

Annotations
@Override
getDashArrayback to summary
public float[] getDashArray()

Returns the dash array.

Returns:float[]

the dash array, never null.

getPhaseback to summary
public int getPhase()

Returns the dash phase. This specifies the distance into the dash pattern at which to start the dash.

Returns:int

the dash phase

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override