public static class PathSegment.Float extends PathSegment
PathSegment.Float | Modifier and Type | Field and Description |
|---|---|
float[] |
data
|
PathSegment |
next
|
PathSegment |
prev
|
protected static float |
ZERO
A very small value that is considered "equivalent to zero" in some operations where machine error may occur.
|
type| Modifier | Constructor and Description |
|---|---|
protected |
Float()
This constructor does not initialize anything.
|
|
Float(float moveX, float moveY)
Initializes a SEG_MOVETO segment.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
append(PathSegment
|
PathSegment |
close()
|
PathSegment |
cubicTo(float cx0, float cy0, float cx1, float cy1, float x1, float y1)
|
PathSegment |
getHead()
|
protected String |
getPath(PathSegment
|
PathSegment |
getTail()
|
float |
getTheta(float t, AffineTransform
Returns the tangent angle at the point t.
|
float |
getTheta(float t, AffineTransform
Returns the tangent angle at the point t.
|
float |
getX(float t)
|
float[] |
getXCoeffs()
|
float[] |
getXCoeffs(AffineTransform
|
float |
getY(float t)
|
float[] |
getYCoeffs()
|
float[] |
getYCoeffs(AffineTransform
|
boolean |
isThetaWellDefined(float t)
|
PathSegment |
lineTo(float x, float y)
|
PathSegment |
moveTo(float x, float y)
|
protected PathSegment |
newSegment()
Subclasses must override this method to return a segment of the correct type.
|
PathSegment |
quadTo(float cx, float cy, float x, float y)
|
void |
rotate(float f)
|
String |
toString()
|
String |
toString(PathSegment
|
void |
write(PathWriter
|
toString, toTypeNamepublic float[] data
public PathSegment.Float next
public PathSegment.Float prev
protected static final float ZERO
public Float(float moveX,
float moveY)
moveX -
moveY -
protected Float()
protected PathSegment.Float newSegment()
public float[] getXCoeffs()
public float[] getXCoeffs(AffineTransformtransform)
public float[] getYCoeffs()
public float[] getYCoeffs(AffineTransformtransform)
public float getTheta(float t,
AffineTransform transform,
boolean confine)
t - the t-value to get the tangent angle for.
confine - this may confine the result to [-pi/2,pi/2]. If this is false, then the result may range from [-pi,pi].
public boolean isThetaWellDefined(float t)
public float getTheta(float t,
AffineTransform transform,
int direction)
t - the t-value to get the tangent angle for.
direction - in the (extremely) rare case where the tangent slope is ambiguous, this indicates which side of the t argument to look at. That is, if you approach t from a smaller value, the angle might be K. If you approach t from a larger value, the angle might be (K+pi). This will happen when the direction of the curve is undefined at t, because the curve is switching from K to (K+pi). When this argument is positive, it assumes t is being approached by values greater than t. When negative, it assumes t is approached from values less than t.
public float getX(float t)
public float getY(float t)
public StringtoString()
public StringtoString(PathSegment .Float end)
protected StringgetPath(PathSegment .Float end)
public PathSegment.Float moveTo(float x, float y)
public PathSegment.Float lineTo(float x, float y)
public PathSegment.Float quadTo(float cx, float cy, float x, float y)
public PathSegment.Float cubicTo(float cx0, float cy0, float cx1, float cy1, float x1, float y1)
public PathSegment.Float close()
protected void append(PathSegment.Float seg)
public PathSegment.Float getHead()
public PathSegment.Float getTail()
public void rotate(float f)
public void write(PathWriterdest, float t0, float t1, AffineTransform transform)