
public class LineToVertical extends PathCommand
PathCommand that represents a vertical line.| Modifier and Type | Field and Description |
|---|---|
protected String |
absoluteName |
protected String |
relativeName |
protected double |
y |
relative| Constructor and Description |
|---|
LineToVertical()
Creates a vertical line
PathCommand. |
LineToVertical(double y)
Creates a vertical line
PathCommand using the given coordinates. |
LineToVertical(double y,
boolean relative)
Creates a vertical line
PathCommand using the given coordinates. |
LineToVertical(LineToVertical vertical)
Creates a copy of the given vertical line
PathCommand. |
| Modifier and Type | Method and Description |
|---|---|
void |
appendTo(StringBuilder build) |
LineToVertical |
copy()
Returns a copy of the path command.
|
double |
getY()
Returns the y-coordinate of the end point of the command.
|
boolean |
nearEqual(PathCommand command)
Determines equality of two commands using rounded values.
|
void |
setY(double y)
Sets the y-coordinate of the end point of the command.
|
void |
toAbsolute(PrecisePoint currentPoint,
PrecisePoint movePoint)
Converts the path commands to absolute coordinates using the given frame of
reference and the last move.
|
List<PathCommand> |
toCurve(PrecisePoint currentPoint,
PrecisePoint movePoint,
PrecisePoint curvePoint,
PrecisePoint quadraticPoint)
Converts the
PathCommand to a CurveTo command. |
String |
toString() |
isRelative, setRelativeprotected double y
protected String absoluteName
protected String relativeName
public LineToVertical()
PathCommand. Defaults to absolute.public LineToVertical(double y)
PathCommand using the given coordinates.
Defaults to absolute.y - the y-coordinate of the end point of the linepublic LineToVertical(double y,
boolean relative)
PathCommand using the given coordinates.y - the y-coordinate of the end point of the linerelative - true if the command is relativepublic LineToVertical(LineToVertical vertical)
PathCommand.vertical - the command to be copiedpublic LineToVertical copy()
PathCommandcopy in class PathCommandpublic double getY()
public boolean nearEqual(PathCommand command)
PathCommandnearEqual in class PathCommandcommand - the command to comparepublic void setY(double y)
y - the y-coordinate of the end point of the commandpublic void toAbsolute(PrecisePoint currentPoint, PrecisePoint movePoint)
PathCommandtoAbsolute in class PathCommandcurrentPoint - frame of referencemovePoint - last move pointpublic List<PathCommand> toCurve(PrecisePoint currentPoint, PrecisePoint movePoint, PrecisePoint curvePoint, PrecisePoint quadraticPoint)
PathCommandPathCommand to a CurveTo command. If a
MoveTo no conversion takes place, but the current move point is
updated.toCurve in class PathCommandcurrentPoint - 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 PathCommandCopyright © 2020. All rights reserved.