public class FastLineVisitor extends SimplePathVisitor
isValid(BasicStroke)
for a set of
useful criteria.CURVE_STEPS
Constructor and Description |
---|
FastLineVisitor() |
Modifier and Type | Method and Description |
---|---|
void |
beginPoly(int windingRule)
Starts the polygon or polyline.
|
void |
closeLine()
Specifies that the preceding subpath should be closed by appending a line
segment back to the point corresponding to the most recent call to
#moveTo(float[]) . |
void |
endPoly()
Signifies that the polygon or polyline has ended.
|
boolean |
isValid(BasicStroke stroke)
Returns
true if this class can reasonably render the line. |
void |
lineTo(float[] vertex)
Specifies the end point of a line to be drawn from the most recently
specified point.
|
void |
moveTo(float[] vertex)
Specifies the starting location for a new subpath.
|
void |
setGLContext(GL context)
Sets the GL context to be used for the next drawing session.
|
void |
setStroke(BasicStroke stroke)
Sets the stroke to be used when drawing a path.
|
cubicTo, getNumCurveSteps, quadTo, setNumCurveSteps
public void setGLContext(GL context)
PathVisitor
context
- The GL contextpublic void setStroke(BasicStroke stroke)
PathVisitor
public boolean isValid(BasicStroke stroke)
true
if this class can reasonably render the line. This
takes into account whether or not the transform will blow the line width
out of scale and it obvious that we aren't drawing correct corners and line
endings.
Note: This must be called before setStroke(BasicStroke)
. If this
returns false
then this renderer should not be used.
public void moveTo(float[] vertex)
PathVisitor
vertex
- An array where the first two values are the x,y coordinates of the
start of the subpath.public void lineTo(float[] vertex)
PathVisitor
vertex
- An array where the first two values are the x,y coordinates of the
next point in the subpath.public void closeLine()
PathVisitor
#moveTo(float[])
.public void beginPoly(int windingRule)
PathVisitor
windingRule
- The winding rule for the polygon.public void endPoly()
PathVisitor
Copyright © 2010-2013. All Rights Reserved.