|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.partnersoft.geometry.xy.XyQuadraticCurve
public class XyQuadraticCurve
A quadratic curve, defined as P(t) = B(2,0)*CP + B(2,1)*P1 + B(2,2)*P2 over the interval 0 <= t <= 1.
Copyright 2007 Partner Software, inc.
| Constructor Summary | |
|---|---|
XyQuadraticCurve(XyPoint startPoint,
XyPoint endPoint,
XyPoint controlPoint)
Creates a new quadratic curve with the given start, end, and control points. |
|
| Method Summary | |
|---|---|
XyBounds |
getBounds()
Returns an XyBounds object representing the rectangular extents of this shape. |
XyPoint |
getControlPoint()
|
XyPoint |
getEndPoint()
Returns the last point in the shape. |
double |
getLength()
Returns the length of the path. |
XyPoint |
getStartPoint()
Returns the first point in the shape. |
java.util.Iterator<XyPoint> |
iterator()
|
XyQuadraticCurve |
scaledBy(double factor)
Return a scaled version of the shape by multiplying all coordinates by the given factor in both dimensions. |
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. |
XyShape |
transformedBy(XyTransform transform)
Transform the shape using the given transform. |
XyQuadraticCurve |
translatedBy(double offsetX,
double offsetY)
Translate the shape by adding all coordinates to the given x and y offsets. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XyQuadraticCurve(XyPoint startPoint,
XyPoint endPoint,
XyPoint controlPoint)
| Method Detail |
|---|
public double getLength()
XyPath
getLength in interface XyPath<XyQuadraticCurve>public XyPoint getStartPoint()
XyPath
getStartPoint in interface XyPath<XyQuadraticCurve>public XyPoint getEndPoint()
XyPath
getEndPoint in interface XyPath<XyQuadraticCurve>public XyPolyline toPolyline()
XyPathXyPath.toPolyline(XyAngle) with a default angle granularity of
1/60 circle (6 degrees, pi/30 radians).
toPolyline in interface XyPath<XyQuadraticCurve>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<XyQuadraticCurve>public XyBounds getBounds()
XyShape
getBounds in interface XyShape<XyQuadraticCurve>public XyQuadraticCurve scaledBy(double factor)
XyShape
scaledBy in interface XyShape<XyQuadraticCurve>factor - scaling factor
public XyShape transformedBy(XyTransform transform)
XyShape
transformedBy in interface XyShape<XyQuadraticCurve>transform - affine transform to apply.
public XyQuadraticCurve translatedBy(double offsetX,
double offsetY)
XyShape
translatedBy in interface XyShape<XyQuadraticCurve>offsetX - offset for the x dimensionoffsetY - offset for the y dimension
public java.util.Iterator<XyPoint> iterator()
iterator in interface java.lang.Iterable<XyPoint>public XyPoint getControlPoint()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||