public class EllipticalArc extends EndPointCommand
PathCommand
that represents a segment of an ellipse.x, y
relative
Constructor and Description |
---|
EllipticalArc()
Creates an elliptical arc
PathCommand . |
EllipticalArc(double radiusX,
double radiusY,
double xAxisRotation,
int largeArcFlag,
int sweepFlag,
double x,
double y)
Creates an elliptical arc
PathCommand using the given values. |
EllipticalArc(double radiusX,
double radiusY,
double xAxisRotation,
int largeArcFlag,
int sweepFlag,
double x,
double y,
boolean relative)
Creates an elliptical arc
PathCommand using the given values. |
EllipticalArc(EllipticalArc command)
Creates a copy of the given elliptical arc.
|
Modifier and Type | Method and Description |
---|---|
void |
appendTo(StringBuilder build) |
EllipticalArc |
copy()
Returns a copy of the path command.
|
int |
getLargeArcFlag()
Returns the large arc flag of the arc.
|
double |
getRadiusX()
Returns the radius of the ellipse on its x-axis.
|
double |
getRadiusY()
Returns the radius of the ellipse on its y-axis.
|
int |
getSweepFlag()
Returns the sweep flag of the arc.
|
double |
getxAxisRotation()
Returns the rotation of the ellipse in relation to the current coordinate
system.
|
boolean |
nearEqual(PathCommand command)
Determines equality of two commands using rounded values.
|
void |
setLargeArcFlag(int largeArcFlag)
Sets the large arc flag of the arc.
|
void |
setRadiusX(double radiusX)
Sets the radius of the ellipse on its x-axis.
|
void |
setRadiusY(double radiusY)
Sets the radius of the ellipse on its y-axis.
|
void |
setSweepFlag(int sweepFlag)
Sets the sweep flag of the arc.
|
void |
setxAxisRotation(double xAxisRotation)
Sets the rotation of the ellipse in relation to the current coordinate
system
|
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 EllipticalArc()
PathCommand
. Defaults to absolute.public EllipticalArc(double radiusX, double radiusY, double xAxisRotation, int largeArcFlag, int sweepFlag, double x, double y)
PathCommand
using the given values.
Defaults to absolute.radiusX
- the radius of the ellipse on its x-axisradiusY
- the radius of the ellipse on its y-axisxAxisRotation
- the rotation of the ellipse in relation to the current
coordinate systemlargeArcFlag
- if 0 then the smaller arc will be used, if 1 then the
largersweepFlag
- if 0 then the arc will be in a negative angle, if 1 then
in a positive anglex
- the x-coordinate of the end of the segmenty
- the y-coordinate of the end of the segmentpublic EllipticalArc(double radiusX, double radiusY, double xAxisRotation, int largeArcFlag, int sweepFlag, double x, double y, boolean relative)
PathCommand
using the given values.radiusX
- the radius of the ellipse on its x-axisradiusY
- the radius of the ellipse on its y-axisxAxisRotation
- the rotation of the ellipse in relation to the current
coordinate systemlargeArcFlag
- if 0 then the smaller arc will be used, if 1 then the
largersweepFlag
- if 0 then the arc will be in a negative angle, if 1 then
in a positive anglex
- the x-coordinate of the end of the segmenty
- the y-coordinate of the end of the segmentrelative
- true if the command is relativepublic EllipticalArc(EllipticalArc command)
command
- the arc to be copiedpublic EllipticalArc copy()
PathCommand
copy
in class PathCommand
public int getLargeArcFlag()
public double getRadiusX()
public double getRadiusY()
public int getSweepFlag()
public double getxAxisRotation()
public boolean nearEqual(PathCommand command)
PathCommand
nearEqual
in class PathCommand
command
- the command to comparepublic void setLargeArcFlag(int largeArcFlag)
largeArcFlag
- if 0 then the smaller arc will be used, if 1 then the
largerpublic void setRadiusX(double radiusX)
radiusX
- the radius of the ellipse on its x-axispublic void setRadiusY(double radiusY)
radiusY
- the radius of the ellipse on its y-axispublic void setSweepFlag(int sweepFlag)
sweepFlag
- if 0 then the arc will be in a negative angle, if 1 then
in a positive anglepublic void setxAxisRotation(double xAxisRotation)
xAxisRotation
- the rotation of the ellipse in relation to the current
coordinate systempublic 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.