Package org.jpedal.manipulator
Class DrawParameters
java.lang.Object
org.jpedal.manipulator.DrawParameters
Holds drawing rules.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intBevel line join stylestatic final intButt line cap stylestatic final intFill path using even-odd winding rule.static final intFill path using non-zero winding rule.static final intMiter line join stylestatic final intEnd path without filling or stroking ("no op").static final intProjecting square line cap stylestatic final intRound line cap stylestatic final intRound line join stylestatic final intStroke path.static final intStroke and fill path using the even-odd winding rule.static final intStroke and fill path using the non-zero winding rule. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloat[]Returns the dash array used for stroking dashed lines.floatReturns the dash phase used for stroking dashed lines.floatReturns the fill transparency.float[]Returns the color used for filling shapes.intReturns the fill rule used for filling paths.intReturns the style of the line cap used when stroking paths.intReturns the style of the line join used when stroking paths.floatReturns the width of the stroke line.floatReturns the miter limit used when stroking with a miter join.floatReturns the stroke transparencyfloat[]Returns the color used for stroking shapes.voidsetDashArray(float[] dashArray) Sets the dash array used for stroking dashed lines.voidsetDashPhase(float dashPhase) Sets the dash phase used for stroking dashed lines.voidsetFillAlpha(float fillAlpha) Sets the fill transparency.voidsetFillColor(float[] fillColor) Sets the color used for filling shapes.voidsetFillRule(int fillRule) Sets the fill rule used for filling paths.voidsetLineCap(int lineCap) Sets the style of the line cap used when stroking paths.voidsetLineJoin(int lineJoin) Sets the style of the line join used when stroking paths.voidsetLineWidth(float lineWidth) Sets the width of the stroke line.voidsetMiterLimit(float miterLimit) Sets the miter limit used when stroking with a miter join.voidsetStrokeAlpha(float strokeAlpha) Sets the stroke transparency.voidsetStrokeColor(float[] strokeColor) Sets the color used for stroking shapes.
-
Field Details
-
NONE
public static final int NONEEnd path without filling or stroking ("no op").- See Also:
-
STROKE
public static final int STROKEStroke path.- See Also:
-
STROKE_FILL_EVEN_ODD
public static final int STROKE_FILL_EVEN_ODDStroke and fill path using the even-odd winding rule.- See Also:
-
STROKE_FILL_NON_ZERO
public static final int STROKE_FILL_NON_ZEROStroke and fill path using the non-zero winding rule.- See Also:
-
FILL_EVEN_ODD
public static final int FILL_EVEN_ODDFill path using even-odd winding rule.- See Also:
-
FILL_NON_ZERO
public static final int FILL_NON_ZEROFill path using non-zero winding rule.- See Also:
-
BUTT_CAP
public static final int BUTT_CAPButt line cap style- See Also:
-
ROUND_CAP
public static final int ROUND_CAPRound line cap style- See Also:
-
PROJECTING_SQUARE_CAP
public static final int PROJECTING_SQUARE_CAPProjecting square line cap style- See Also:
-
MITER_JOIN
public static final int MITER_JOINMiter line join style- See Also:
-
ROUND_JOIN
public static final int ROUND_JOINRound line join style- See Also:
-
BEVEL_JOIN
public static final int BEVEL_JOINBevel 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.- 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.- 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
-