java.lang.Object
java.awt.geom.Path2D
java.awt.geom.Path2D.Double
org.jhotdraw8.geom.SvgPath2D
- All Implemented Interfaces:
Shape,Serializable,Cloneable
SvgPath2D adds an arcTo method to Path2D.Double.- Author:
- Werner Randelshofer
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.awt.geom.Path2D
Path2D.Double, Path2D.Float -
Field Summary
Fields inherited from class java.awt.geom.Path2D
WIND_EVEN_ODD, WIND_NON_ZERO -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidarcTo(double rx, double ry, double xAxisRotation, double x, double y, boolean largeArcFlag, boolean sweepFlag) Adds an elliptical arc, defined by two radii, an angle from the x-axis, a flag to choose the large arc or not, a flag to indicate if we increase or decrease the angles and the final point of the arc.Methods inherited from class java.awt.geom.Path2D.Double
append, clone, curveTo, getBounds2D, getPathIterator, lineTo, moveTo, quadTo, transform, trimToSizeMethods inherited from class java.awt.geom.Path2D
append, closePath, contains, contains, contains, contains, contains, contains, contains, contains, createTransformedShape, getBounds, getCurrentPoint, getPathIterator, getWindingRule, intersects, intersects, intersects, intersects, reset, setWindingRule
-
Constructor Details
-
SvgPath2D
public SvgPath2D()
-
-
Method Details
-
arcTo
public void arcTo(double rx, double ry, double xAxisRotation, double x, double y, boolean largeArcFlag, boolean sweepFlag) Adds an elliptical arc, defined by two radii, an angle from the x-axis, a flag to choose the large arc or not, a flag to indicate if we increase or decrease the angles and the final point of the arc.As specified in w3.org
- Parameters:
rx- the x radius of the ellipsery- the y radius of the ellipsexAxisRotation- the angle from the x-axis of the current coordinate system to the x-axis of the ellipse in degrees.x- the absolute x coordinate of the final point of the arc.y- the absolute y coordinate of the final point of the arc.largeArcFlag- the large arc flag. If true the arc spanning less than or equal to 180 degrees is chosen, otherwise the arc spanning greater than 180 degrees is chosensweepFlag- the sweep flag. If true the line joining center to arc sweeps through decreasing angles otherwise it sweeps through increasing angles
-