Package snap.geom
Class Arc
java.lang.Object
snap.geom.Shape
snap.geom.RectBase
snap.geom.Arc
- All Implemented Interfaces:
Cloneable
A Shape subclass to represent a segment of an ellipse with start and sweep angle.
-
Nested Class Summary
-
Field Summary
Fields inherited from class snap.geom.Shape
_bounds, WIND_EVEN_ODD, WIND_NON_ZERO
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the shape in rect.boolean
Standard equals implementation.Returns how an open arc is handles the gap.double
Returns the ratio that describes the hole (0 = no hole, 1 = no wedge).getPathIter
(Transform aTrans) Returns the path iter.double
Returns the start angle for the oval.double
Returns the sweep angle for the oval.void
setClosure
(Arc.Closure aClosure) Sets how an open arc is handles the gap.void
setHoleRatio
(double aValue) Sets the ratio that describes the hole (0 = no hole, 1 = no wedge).void
setStartAngle
(double aValue) Sets the start angle for the oval.void
setSweepAngle
(double aValue) Sets the sweep angle for the oval.Methods inherited from class snap.geom.RectBase
clone, copyFor, equals, getBoundsImpl, getHeight, getMaxX, getMaxY, getMidX, getMidY, getMinX, getMinY, getSize, getSvgString, getWidth, getX, getXY, getY, inset, inset, inset, isEmpty, offset, setCenteredXY, setHeight, setRect, setRect, setSize, setWidth, setX, setXY, setY, toString
Methods inherited from class snap.geom.Shape
addShapes, contains, contains, contains, contains, containsSeg, copyForBounds, crossesSeg, getArcLength, getBounds, getCrossings, getDistance, getFlattenedShape, getFlattenedShape, getNotSelfIntersectingShape, intersectShapes, intersectsSeg, intersectsShape, intersectsShape, intersectsXY, isClosed, isFlat, isMultiCycle, isSelfIntersecting, isSingleCycle, shapeChanged, subtractShapes
-
Constructor Details
-
Arc
public Arc(double aX, double aY, double aW, double aH, double aStart, double aSweep) Creates a new Arc. -
Arc
public Arc(double aX, double aY, double aW, double aH, double aStart, double aSweep, double aHoleRatio) Creates a new Arc.
-
-
Method Details
-
getStartAngle
public double getStartAngle()Returns the start angle for the oval. -
setStartAngle
public void setStartAngle(double aValue) Sets the start angle for the oval. -
getSweepAngle
public double getSweepAngle()Returns the sweep angle for the oval. -
setSweepAngle
public void setSweepAngle(double aValue) Sets the sweep angle for the oval. -
getHoleRatio
public double getHoleRatio()Returns the ratio that describes the hole (0 = no hole, 1 = no wedge). -
setHoleRatio
public void setHoleRatio(double aValue) Sets the ratio that describes the hole (0 = no hole, 1 = no wedge). -
getClosure
Returns how an open arc is handles the gap. -
setClosure
Sets how an open arc is handles the gap. -
getPathIter
Returns the path iter.- Specified by:
getPathIter
in classShape
-
copyFor
Returns the shape in rect. -
equals
Standard equals implementation.
-