public class CurveToQuadraticSmooth extends EndPointCommand
PathCommand
that represents a shorthand quadratic Bézier segment.
The control point is assumed to be the reflection of the control point on the
previous command relative to the current point.Constructor and Description |
---|
CurveToQuadraticSmooth()
Creates a shorthand quadratic curve
PathCommand with the given
points. |
CurveToQuadraticSmooth(CurveToQuadraticSmooth smoothQuadratic)
Creates a copy of the given shorthand quadratic curve
PathCommand
with the given points. |
CurveToQuadraticSmooth(double x,
double y)
Creates a shorthand quadratic curve
PathCommand with the given
points. |
CurveToQuadraticSmooth(double x,
double y,
boolean relative)
Creates a shorthand quadratic curve
PathCommand with the given
points. |
Modifier and Type | Method and Description |
---|---|
void |
appendTo(StringBuilder build) |
CurveToQuadraticSmooth |
copy()
Returns a copy of the path command.
|
boolean |
nearEqual(PathCommand command)
Determines equality of two commands using rounded values.
|
List<PathCommand> |
toCurve(PrecisePoint currentPoint,
PrecisePoint movePoint,
PrecisePoint curvePoint,
PrecisePoint quadraticPoint)
Converts the
PathCommand to a CurveTo command. |
String |
toString() |
getX, getY, setX, setY, toAbsolute
isRelative, setRelative
public CurveToQuadraticSmooth()
PathCommand
with the given
points. Defaults to absolute.public CurveToQuadraticSmooth(CurveToQuadraticSmooth smoothQuadratic)
PathCommand
with the given points.smoothQuadratic
- the shorthand quadratic curve to copypublic CurveToQuadraticSmooth(double x, double y)
PathCommand
with the given
points. Defaults to absolute.x
- the x-coordinate of the end of the segmenty
- the y-coordinate of the end of the segmentpublic CurveToQuadraticSmooth(double x, double y, boolean relative)
PathCommand
with the given
points.x
- the x-coordinate of the end of the segmenty
- the y-coordinate of the end of the segmentrelative
- true if the command is relativepublic CurveToQuadraticSmooth copy()
PathCommand
copy
in class PathCommand
public boolean nearEqual(PathCommand command)
PathCommand
nearEqual
in class PathCommand
command
- the command to comparepublic List<PathCommand> toCurve(PrecisePoint currentPoint, PrecisePoint movePoint, PrecisePoint curvePoint, PrecisePoint quadraticPoint)
PathCommand
PathCommand
to a CurveTo
command. If a
MoveTo
no conversion takes place, but the current move point is
updated.toCurve
in class PathCommand
currentPoint
- the current point of the pathmovePoint
- the frame of reference for the pathcurvePoint
- the frame of reference for the BézierquadraticPoint
- the beginning of the last quadratic curvepublic void appendTo(StringBuilder build)
appendTo
in class PathCommand
Copyright © 2015. All rights reserved.