Package org.jpedal.manipulator
Class DrawParameters
java.lang.Object
org.jpedal.manipulator.DrawParameters
Holds drawing rules
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Bevel line join stylestatic final int
Butt line cap stylestatic 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 stylestatic final int
End path without filling or stroking ("no op").static final int
Projecting square line cap stylestatic final int
Round line cap stylestatic final int
Round line join stylestatic 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 -
Method Summary
Modifier and TypeMethodDescriptionfloat[]
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 transparencyfloat[]
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.
-
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
-