Class PDLineDashPattern

  • All Implemented Interfaces:
    java.lang.Cloneable, COSObjectable

    public class PDLineDashPattern
    extends java.lang.Object
    implements COSObjectable, java.lang.Cloneable
    This class represents the line dash pattern for a graphics state. See PDF Reference 1.5 section 4.3.2
    Version:
    $Revision: 1.7 $
    Author:
    Ben Litchfield
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object clone()
      COSArray getCOSDashPattern()
      Get the line dash pattern as a COS object.
      COSBase getCOSObject()
      Convert this standard java object to a COS object.
      java.util.List getDashPattern()
      This will return a list of java.lang.Integer objects that represent the line dash pattern appearance.
      int getPhaseStart()
      This will get the line dash pattern phase.
      boolean isDashPatternEmpty()
      Checks if the dashPattern is empty or all values equals 0.
      void setDashPattern​(java.util.List dashPattern)
      This will replace the existing line dash pattern.
      void setPhaseStart​(int phase)
      This will set the line dash pattern phase.
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PDLineDashPattern

        public PDLineDashPattern()
        Creates a blank line dash pattern. With no dashes and a phase of 0.
      • PDLineDashPattern

        public PDLineDashPattern​(COSArray ldp)
        Constructs a line dash pattern from an existing array.
        Parameters:
        ldp - The existing line dash pattern.
      • PDLineDashPattern

        public PDLineDashPattern​(COSArray ldp,
                                 int phase)
        Constructs a line dash pattern from an existing array.
        Parameters:
        ldp - The existing line dash pattern.
        phase - The phase for the line dash pattern.
    • Method Detail

      • clone

        public java.lang.Object clone()
        Overrides:
        clone in class java.lang.Object
      • getCOSObject

        public COSBase getCOSObject()
        Convert this standard java object to a COS object.
        Specified by:
        getCOSObject in interface COSObjectable
        Returns:
        The cos object that matches this Java object.
      • getPhaseStart

        public int getPhaseStart()
        This will get the line dash pattern phase. The dash phase specifies the distance into the dash pattern at which to start the dash.
        Returns:
        The line dash pattern phase.
      • setPhaseStart

        public void setPhaseStart​(int phase)
        This will set the line dash pattern phase.
        Parameters:
        phase - The new line dash patter phase.
      • getDashPattern

        public java.util.List getDashPattern()
        This will return a list of java.lang.Integer objects that represent the line dash pattern appearance.
        Returns:
        The line dash pattern.
      • getCOSDashPattern

        public COSArray getCOSDashPattern()
        Get the line dash pattern as a COS object.
        Returns:
        The cos array line dash pattern.
      • setDashPattern

        public void setDashPattern​(java.util.List dashPattern)
        This will replace the existing line dash pattern.
        Parameters:
        dashPattern - A list of java.lang.Integer objects.
      • isDashPatternEmpty

        public boolean isDashPatternEmpty()
        Checks if the dashPattern is empty or all values equals 0.
        Returns:
        true if the dashPattern is empty or all values equals 0