public abstract class PathCommand extends Object
Constructor and Description |
---|
PathCommand()
Creates a path command.
|
PathCommand(boolean relative)
Creates a path command.
|
PathCommand(PathCommand command)
Creates a copy of the given command.
|
Modifier and Type | Method and Description |
---|---|
abstract void |
appendTo(StringBuilder build) |
abstract PathCommand |
copy()
Returns a copy of the path command.
|
boolean |
isRelative()
Returns true if the command is relative.
|
abstract boolean |
nearEqual(PathCommand command)
Determines equality of two commands using rounded values.
|
void |
setRelative(boolean relative)
Sets the command to relative or absolute
|
void |
toAbsolute(PrecisePoint currentPoint,
PrecisePoint movePoint)
Converts the path commands to absolute coordinates using the given frame of
reference and the last move.
|
abstract List<PathCommand> |
toCurve(PrecisePoint currentPoint,
PrecisePoint movePoint,
PrecisePoint curvePoint,
PrecisePoint quadraticPoint)
Converts the
PathCommand to a CurveTo command. |
public PathCommand()
public PathCommand(boolean relative)
relative
- true if the command is relativepublic PathCommand(PathCommand command)
command
- the command to be copiedpublic abstract void appendTo(StringBuilder build)
public abstract PathCommand copy()
public boolean isRelative()
public abstract boolean nearEqual(PathCommand command)
command
- the command to comparepublic void setRelative(boolean relative)
relative
- true if relativepublic void toAbsolute(PrecisePoint currentPoint, PrecisePoint movePoint)
currentPoint
- frame of referencemovePoint
- last move pointpublic abstract List<PathCommand> toCurve(PrecisePoint currentPoint, PrecisePoint movePoint, PrecisePoint curvePoint, PrecisePoint quadraticPoint)
PathCommand
to a CurveTo
command. If a
MoveTo
no conversion takes place, but the current move point is
updated.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 curveCopyright © 2015. All rights reserved.