public class LineTo extends EndPointCommand
PathCommand
that represents a line.x, y
relative
Constructor and Description |
---|
LineTo()
Creates a line
PathCommand . |
LineTo(double x,
double y)
Creates a line
PathCommand using the given coordinates. |
LineTo(double x,
double y,
boolean relative)
Creates a line
PathCommand using the given coordinates. |
LineTo(LineTo command)
Creates a copy of the given line
PathCommand . |
Modifier and Type | Method and Description |
---|---|
void |
appendTo(StringBuilder build) |
LineTo |
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 LineTo()
PathCommand
. Defaults to absolute.public LineTo(double x, double y)
PathCommand
using the given coordinates. Defaults to
absolute.x
- the x-coordinate of the end point of the liney
- the y-coordinate of the end point of the linepublic LineTo(double x, double y, boolean relative)
PathCommand
using the given coordinates.x
- the x-coordinate of the end point of the liney
- the y-coordinate of the end point of the linerelative
- true if the command is relativepublic LineTo(LineTo command)
PathCommand
.command
- the command to be copiedpublic LineTo 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 © 2018. All rights reserved.