Class PDLineDashPattern

  • All Implemented Interfaces:
    COSObjectable

    public final class PDLineDashPattern
    extends java.lang.Object
    implements COSObjectable
    A line dash pattern for stroking paths. Instances of PDLineDashPattern are immutable.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private float[] array  
      private int phase  
    • Constructor Summary

      Constructors 
      Constructor Description
      PDLineDashPattern()
      Creates a new line dash pattern, with no dashes and a phase of 0.
      PDLineDashPattern​(COSArray array, int phase)
      Creates a new line dash pattern from a dash array and phase.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      COSBase getCOSObject()
      Convert this standard java object to a COS object.
      float[] getDashArray()
      Returns the dash array.
      int getPhase()
      Returns the dash phase.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • phase

        private final int phase
      • array

        private final float[] array
    • Constructor Detail

      • PDLineDashPattern

        public PDLineDashPattern()
        Creates a new line dash pattern, with no dashes and a phase of 0.
      • PDLineDashPattern

        public PDLineDashPattern​(COSArray array,
                                 int phase)
        Creates a new line dash pattern from a dash array and phase.
        Parameters:
        array - the dash array
        phase - the phase
    • Method Detail

      • getCOSObject

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

        public int getPhase()
        Returns the dash phase. This specifies the distance into the dash pattern at which to start the dash.
        Returns:
        the dash phase
      • getDashArray

        public float[] getDashArray()
        Returns the dash array.
        Returns:
        the dash array, never null.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object