Class GraphicState

java.lang.Object
com.datalogics.PDFL.GraphicState

public class GraphicState extends Object
The graphic state is an internal data structure in a PDF file. The graphics state holds the parameters that describe graphics within that file.

These parameters define how individual graphics are presented on the page, including layers and transparencies.

  • Constructor Details

    • GraphicState

      public GraphicState()
      Create a new default GraphicState.
  • Method Details

    • delete

      public void delete()
    • getWidth

      public double getWidth()
      The width used for drawing by the current GraphicState.
    • setWidth

      public void setWidth(double width)
      The width used for drawing by the current GraphicState.
    • getLineCap

      public LineCap getLineCap()
      The line cap used by the current GraphicState.
    • setLineCap

      public void setLineCap(LineCap LineCap)
      The line cap used by the current GraphicState.
    • getLineJoin

      public LineJoin getLineJoin()
      The line join style used by the current GraphicState.
    • setLineJoin

      public void setLineJoin(LineJoin LineJoin)
      The line join style to be used by the current GraphicState.
    • getDashPattern

      public List<Double> getDashPattern()
      The line DashPattern controls the pattern of dashes and gaps used to stroke paths. It is specified by a dash phase and then a series of elements of a DashPattern list. The DashPattern's members are numbers that specify the lengths of alternating dashes and gaps; the numbers must be nonnegative and not all zero. The dash phase specifies the distance into the dash pattern at which to start the dash. The elements of both the DashPattern List and the dash phase are expressed in user space units. This retrieves the DashPattern used by the Pattern list current graphic state.

      Returns:
      A list containing the dash phase followed by the contents of the DashPattern.
    • setDashPattern

      public void setDashPattern(List<Double> DashPattern)
      The line DashPattern controls the pattern of dashes and gaps used to stroke paths. It is specified by a dash phase and then a series of elements of a DashPattern list. The DashPattern's members are numbers that specify the lengths of alternating dashes and gaps; the numbers must be nonnegative and not all zero. The dash phase specifies the distance into the dash pattern at which to start the dash. The elements of both the DashPattern List and the dash phase are expressed in user space units. This retrieves the DashPattern used by the Pattern list current graphic state.

      Parameters:
      DashPattern - A list containing the dash phase followed by the contents of the DashPattern.
    • setFillColor

      public void setFillColor(Color fillcolor)
      The fill color of the GraphicState.

      Parameters:
      fillcolor - (DeviceGray, GrayScalevalue or fillcolor (DeviceRGB, Redvalue, Greenvalue, Bluevalue or fillcolor (DeviceCMYK, Cyanvalue, Magentavalue, Yellowvalue, Blackvalue
    • setStrokeColor

      public void setStrokeColor(Color strokecolor)
      The stroke color of the GraphicState.

      Parameters:
      strokecolor - (DeviceGray, GrayScalevalue or strokecolor (DeviceRGB, Redvalue, Greenvalue, Bluevalue or strokecolor (DeviceCMYK, Cyanvalue, Magentavalue, Yellowvalue, Blackvalue
    • getFillColor

      public Color getFillColor()
      The fill color of the GraphicState.
    • getStrokeColor

      public Color getStrokeColor()
      The stroke color of the GraphicState.
    • getMiterLimit

      public double getMiterLimit()
      The miter limit corresponding to the M operator. Default is 10.0.
    • setMiterLimit

      public void setMiterLimit(double miterLimit)
      The miter limit corresponding to the M operator. Default is 10.0.
    • getLineFlatness

      public double getLineFlatness()
      The line flatness corresponding to the i operator. Default is 1.0.
    • setLineFlatness

      public void setLineFlatness(double flatness)
      The line flatness corresponding to the i operator. Default is 1.0.
    • getRenderIntent

      public RenderIntent getRenderIntent()
      A color rendering intent corresponding to the Intent key in the image dictionary. The default is RelColorimetric.
    • setRenderIntent

      public void setRenderIntent(RenderIntent renderingIntent)
      A color rendering intent corresponding to the Intent key in the image dictionary. The default is RelColorimetric.
    • getExtendedGraphicState

      public ExtendedGraphicState getExtendedGraphicState()
      The ExtendedGraphicState, which can contain additional graphic state parameters.
    • setExtendedGraphicState

      public void setExtendedGraphicState(ExtendedGraphicState extendedGraphicState)
      The ExtendedGraphicState, which can contain additional graphic state parameters.