com.itextpdf.text.pdf.parser
Class LineDashPattern

java.lang.Object
  extended by com.itextpdf.text.pdf.parser.LineDashPattern

public class LineDashPattern
extends Object

Represents the line dash pattern. The line dash pattern shall control the pattern of dashes and gaps used to stroke paths. It shall be specified by a dash array and a dash phase.

Since:
5.5.6

Nested Class Summary
 class LineDashPattern.DashArrayElem
           
 
Constructor Summary
LineDashPattern(PdfArray dashArray, float dashPhase)
          Creates new LineDashPattern object.
 
Method Summary
 PdfArray getDashArray()
          Getter for the dash array.
 float getDashPhase()
          Getter for the dash phase.
 LineDashPattern.DashArrayElem next()
          Calculates and returns the next element which is either gap or dash.
 void reset()
          Resets the dash array so that the next() method will start from the beginning of the dash array.
 void setDashArray(PdfArray dashArray)
          Setter for the dash array.
 void setDashPhase(float dashPhase)
          Setter for the dash phase.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LineDashPattern

public LineDashPattern(PdfArray dashArray,
                       float dashPhase)
Creates new LineDashPattern object.

Parameters:
dashArray - The dash array. See getDashArray()
dashPhase - The dash phase. See getDashPhase()
Method Detail

getDashArray

public PdfArray getDashArray()
Getter for the dash array. The dash array’s elements is number that specify the lengths of alternating dashes and gaps; the numbers are nonnegative. The elements are expressed in user space units.

Returns:
The dash array.

setDashArray

public void setDashArray(PdfArray dashArray)
Setter for the dash array. See getDashArray()

Parameters:
dashArray - New dash array.

getDashPhase

public float getDashPhase()
Getter for the dash phase. The dash phase shall specify the distance into the dash pattern at which to start the dash. The elements are expressed in user space units.

Returns:
The dash phase.

setDashPhase

public void setDashPhase(float dashPhase)
Setter for the dash phase. See getDashArray()

Parameters:
dashPhase - New dash phase.

next

public LineDashPattern.DashArrayElem next()
Calculates and returns the next element which is either gap or dash.

Returns:
The next dash array's element.

reset

public void reset()
Resets the dash array so that the next() method will start from the beginning of the dash array.



Copyright © 2015. All Rights Reserved.