Class DrawParameters

java.lang.Object
org.jpedal.manipulator.DrawParameters

public final class DrawParameters extends Object
Holds drawing rules
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Bevel line join style
    static final int
    Butt line cap style
    static final int
    Fill path using even-odd winding rule.
    static final int
    Fill path using non-zero winding rule.
    static final int
    Miter line join style
    static final int
    End path without filling or stroking ("no op").
    static final int
    Projecting square line cap style
    static final int
    Round line cap style
    static final int
    Round line join style
    static final int
    Stroke path.
    static final int
    Stroke and fill path using the even-odd winding rule.
    static final int
    Stroke and fill path using the non-zero winding rule.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Create a new set of drawing rules
  • Method Summary

    Modifier and Type
    Method
    Description
    float[]
    Returns the dash array used for stroking dashed lines.
    float
    Returns the dash phase used for stroking dashed lines.
    float
    Returns the fill transparency.
    float[]
    Returns the color used for filling shapes.
    int
    Returns the fill rule used for filling paths.
    int
    Returns the style of the line cap used when stroking paths.
    int
    Returns the style of the line join used when stroking paths.
    float
    Returns the width of the stroke line.
    float
    Returns the miter limit used when stroking with a miter join.
    float
    Returns the stroke transparency
    float[]
    Returns the color used for stroking shapes.
    void
    setDashArray(float[] dashArray)
    Sets the dash array used for stroking dashed lines.
    void
    setDashPhase(float dashPhase)
    Sets the dash phase used for stroking dashed lines.
    void
    setFillAlpha(float fillAlpha)
    Sets the fill transparency.
    void
    setFillColor(float[] fillColor)
    Sets the color used for filling shapes.
    void
    setFillRule(int fillRule)
    Sets the fill rule used for filling paths.
    void
    setLineCap(int lineCap)
    Sets the style of the line cap used when stroking paths.
    void
    setLineJoin(int lineJoin)
    Sets the style of the line join used when stroking paths.
    void
    setLineWidth(float lineWidth)
    Sets the width of the stroke line.
    void
    setMiterLimit(float miterLimit)
    Sets the miter limit used when stroking with a miter join.
    void
    setStrokeAlpha(float strokeAlpha)
    Sets the stroke transparency.
    void
    setStrokeColor(float[] strokeColor)
    Sets the color used for stroking shapes.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • NONE

      public static final int NONE
      End path without filling or stroking ("no op").
      See Also:
    • STROKE

      public static final int STROKE
      Stroke path.
      See Also:
    • STROKE_FILL_EVEN_ODD

      public static final int STROKE_FILL_EVEN_ODD
      Stroke and fill path using the even-odd winding rule.
      See Also:
    • STROKE_FILL_NON_ZERO

      public static final int STROKE_FILL_NON_ZERO
      Stroke and fill path using the non-zero winding rule.
      See Also:
    • FILL_EVEN_ODD

      public static final int FILL_EVEN_ODD
      Fill path using even-odd winding rule.
      See Also:
    • FILL_NON_ZERO

      public static final int FILL_NON_ZERO
      Fill path using non-zero winding rule.
      See Also:
    • BUTT_CAP

      public static final int BUTT_CAP
      Butt line cap style
      See Also:
    • ROUND_CAP

      public static final int ROUND_CAP
      Round line cap style
      See Also:
    • PROJECTING_SQUARE_CAP

      public static final int PROJECTING_SQUARE_CAP
      Projecting square line cap style
      See Also:
    • MITER_JOIN

      public static final int MITER_JOIN
      Miter line join style
      See Also:
    • ROUND_JOIN

      public static final int ROUND_JOIN
      Round line join style
      See Also:
    • BEVEL_JOIN

      public static final int BEVEL_JOIN
      Bevel line join style
      See Also:
  • Constructor Details

    • DrawParameters

      public DrawParameters()
      Create a new set of drawing rules
  • Method Details

    • getFillRule

      public int getFillRule()
      Returns the fill rule used for filling paths.
      Returns:
      the fill rule as an integer
    • setFillRule

      public void setFillRule(int fillRule)
      Sets the fill rule used for filling paths.
      Parameters:
      fillRule - the fill rule to set
    • getFillColor

      public float[] getFillColor()
      Returns the color used for filling shapes.
      Returns:
      an array of floats representing the fill color in RGB
    • setFillColor

      public void setFillColor(float[] fillColor)
      Sets the color used for filling shapes.
      Parameters:
      fillColor - an array of floats representing the fill color in RGB
    • getStrokeColor

      public float[] getStrokeColor()
      Returns the color used for stroking shapes.
      Returns:
      an array of floats representing the stroke color in RGB
    • setStrokeColor

      public void setStrokeColor(float[] strokeColor)
      Sets the color used for stroking shapes.
      Parameters:
      strokeColor - an array of floats representing the stroke color in RGB
    • getLineWidth

      public float getLineWidth()
      Returns the width of the stroke line.
      Returns:
      the line width as a float
    • setLineWidth

      public void setLineWidth(float lineWidth)
      Sets the width of the stroke line.
      Parameters:
      lineWidth - the line width to set
    • getLineCap

      public int getLineCap()
      Returns the style of the line cap used when stroking paths.
      Returns:
      the line cap style as an integer
    • setLineCap

      public void setLineCap(int lineCap)
      Sets the style of the line cap used when stroking paths.
      See constants above.
      Parameters:
      lineCap - the line cap style to set
    • getLineJoin

      public int getLineJoin()
      Returns the style of the line join used when stroking paths.
      Returns:
      the line join style as an integer
    • setLineJoin

      public void setLineJoin(int lineJoin)
      Sets the style of the line join used when stroking paths.
      See constants above.
      Parameters:
      lineJoin - the line join style to set
    • getMiterLimit

      public float getMiterLimit()
      Returns the miter limit used when stroking with a miter join.
      Returns:
      the miter limit as a float
    • setMiterLimit

      public void setMiterLimit(float miterLimit)
      Sets the miter limit used when stroking with a miter join.
      Parameters:
      miterLimit - the miter limit to set
    • getDashArray

      public float[] getDashArray()
      Returns the dash array used for stroking dashed lines.
      Returns:
      an array of floats representing the dash pattern
    • setDashArray

      public void setDashArray(float[] dashArray)
      Sets the dash array used for stroking dashed lines.

      See setDashPhase(float)

      Parameters:
      dashArray - an array of floats representing the dash pattern
    • getDashPhase

      public float getDashPhase()
      Returns the dash phase used for stroking dashed lines.
      Returns:
      the dash phase as a float
    • setDashPhase

      public void setDashPhase(float dashPhase)
      Sets the dash phase used for stroking dashed lines.

      See setDashArray(float[])

      Parameters:
      dashPhase - the dash phase to set
    • getFillAlpha

      public float getFillAlpha()
      Returns the fill transparency.
      Returns:
      the alpha as a float
    • setFillAlpha

      public void setFillAlpha(float fillAlpha)
      Sets the fill transparency.
      Parameters:
      fillAlpha - the alpha to set
    • getStrokeAlpha

      public float getStrokeAlpha()
      Returns the stroke transparency
      Returns:
      the alpha as a float
    • setStrokeAlpha

      public void setStrokeAlpha(float strokeAlpha)
      Sets the stroke transparency.
      Parameters:
      strokeAlpha - the alpha to set