|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.partnersoft.geometry.xy.XyArc
public class XyArc
A partial circle in (x, y) space.
Copyright 2007 Partner Software, Inc.
| Constructor Summary | |
|---|---|
XyArc(XyPoint center,
double radius,
XyDeflection deflection)
Creates a new XyArc from the given center, radius, and deflection. |
|
XyArc(XyPoint center,
double radius,
XyDirection start,
XyDirection end,
boolean clockwise)
Creates a new XyArc starting at the given start angle and ending at the given end angle. |
|
| Method Summary | |
|---|---|
boolean |
containsDirection(XyDirection direction)
Returns true if the given angle is part of this arc. |
boolean |
equals(java.lang.Object nother)
|
XyAngle |
getAngle()
Returns the angular width (the angular difference between the start and end directions positions). |
XyBounds |
getBounds()
Returns an XyBounds object representing the rectangular extents of this shape. |
XyPoint |
getCenter()
Geometric center of circle. |
XyDirection |
getEnd()
Ending direction for arc. |
XyPoint |
getEndPoint()
Returns the last point in the shape. |
double |
getLength()
Returns the length of the path. |
double |
getRadius()
Returns the radius of the circle containing this arc. |
XyDirection |
getStart()
Starting direction for arc. |
XyPoint |
getStartPoint()
Returns the first point in the shape. |
boolean |
isClockwise()
If true, arc proceeds clockwise from start to end. |
java.util.Iterator<XyPoint> |
iterator()
|
XyArc |
reversed()
Returns a modified version of this arc with the start and end swapped and the clockwise flag reversed. |
XyArc |
scaledBy(double scale)
Return a scaled version of the shape by multiplying all coordinates by the given factor in both dimensions. |
XyArc |
scaledBy(double scaleX,
double scaleY)
|
XyPolyline |
toPolyline()
Same as XyPath.toPolyline(XyAngle) with a default angle granularity of
1/60 circle (6 degrees, pi/30 radians). |
XyPolyline |
toPolyline(XyAngle granularity)
Converts this area to a polyline which approximates it in some fashion. |
java.lang.String |
toString()
|
XyShape |
transformedBy(XyTransform transform)
Transform the shape using the given transform. |
XyArc |
translatedBy(double offsetX,
double offsetY)
Translate the shape by adding all coordinates to the given x and y offsets. |
XyArc |
withCenter(XyPoint newCenter)
Returns a modified version of this arc with the given center. |
XyArc |
withClockwise(boolean newClockwise)
Returns a modified version of this arc with the given clockwise flag. |
XyArc |
withEnd(XyDirection newEnd)
Returns a modified version of this arc with the given end direction. |
XyArc |
withRadius(double newRadius)
Returns a modified version of this arc with the given radius. |
XyArc |
withStart(XyDirection newStart)
Returns a modified version of this arc with the given start direction. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public XyArc(XyPoint center,
double radius,
XyDirection start,
XyDirection end,
boolean clockwise)
public XyArc(XyPoint center,
double radius,
XyDeflection deflection)
| Method Detail |
|---|
public XyArc withStart(XyDirection newStart)
public XyArc withEnd(XyDirection newEnd)
public XyArc withCenter(XyPoint newCenter)
public XyArc withRadius(double newRadius)
public XyArc withClockwise(boolean newClockwise)
public XyArc reversed()
public boolean containsDirection(XyDirection direction)
public XyPolyline toPolyline(XyAngle granularity)
XyPathThe angle parameter allows a certain level of control of the output. Essentially it dictates the minimum angular granularity used to approximate curved paths. For example, an arc would be turned into a polyline by placing points around the arc's slice of a circle, separated by the given angle.
toPolyline in interface XyPath<XyArc>public XyPolyline toPolyline()
XyPathXyPath.toPolyline(XyAngle) with a default angle granularity of
1/60 circle (6 degrees, pi/30 radians).
toPolyline in interface XyPath<XyArc>public double getLength()
XyPath
getLength in interface XyPath<XyArc>public XyPoint getStartPoint()
XyPath
getStartPoint in interface XyPath<XyArc>public XyPoint getEndPoint()
XyPath
getEndPoint in interface XyPath<XyArc>public XyArc scaledBy(double scale)
XyShape
scaledBy in interface XyShape<XyArc>scale - scaling factor
public XyArc scaledBy(double scaleX,
double scaleY)
public XyArc translatedBy(double offsetX,
double offsetY)
XyShape
translatedBy in interface XyShape<XyArc>offsetX - offset for the x dimensionoffsetY - offset for the y dimension
public XyShape transformedBy(XyTransform transform)
XyShape
transformedBy in interface XyShape<XyArc>transform - affine transform to apply.
public XyBounds getBounds()
XyShape
getBounds in interface XyShape<XyArc>public java.util.Iterator<XyPoint> iterator()
iterator in interface java.lang.Iterable<XyPoint>public java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object nother)
equals in class java.lang.Objectpublic XyPoint getCenter()
public double getRadius()
public boolean isClockwise()
public XyDirection getStart()
public XyDirection getEnd()
public XyAngle getAngle()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||