Package com.reportmill.graphics
Class RMQuadratic
- java.lang.Object
- 
- com.reportmill.base.RMObject
- 
- com.reportmill.graphics.RMLine
- 
- com.reportmill.graphics.RMQuadratic
 
 
 
- 
- All Implemented Interfaces:
- RMArchiver.Archiving,- java.lang.Cloneable
 - Direct Known Subclasses:
- RMBezier
 
 public class RMQuadratic extends RMLine This class models a simple quadratic curve, providing methods for extracting points, distance calculation, bisection, hit detection and such.
- 
- 
Constructor SummaryConstructors Constructor Description RMQuadratic()Creates a new quadratic curve.RMQuadratic(RMPoint startPoint, RMPoint controlPoint, RMPoint endPoint)Creates a new quadratic curve for this gvein start point, control point and end point.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description doublegetDistanceQuadratic(RMPoint aPoint)Returns the minimum distance from the given point to the curve.floatgetMaxX()Returns the max x point of this bezier.floatgetMaxY()Returns the max y point of this bezier.floatgetMinX()Returns the min x point of this bezier.floatgetMinY()Returns the min y point of this bezier.RMPointgetPoint(double t)Returns the point on this curve at the parametric location t (defined from 0-1).voidsetCurve(float x1, float y1, float x2, float y2, float x3, float y3)Sets the curve values.voidsetCurve(RMPoint p1, RMPoint p2, RMPoint p3)Sets the curve values.voidsubdivide(RMQuadratic left, RMQuadratic right)Subdivides this curve into the given left and right curves.- 
Methods inherited from class com.reportmill.graphics.RMLinegetDistanceLine, getDistanceToLineSquared, getHead, getHitInfo, getHitInfo, getHitInfo, getTail, setEnd, setStart, toString
 - 
Methods inherited from class com.reportmill.base.RMObjectclone, copy, didChange, didUndo, getAnimAttribute, getClassNameShort, initWithArchiver, undoClone, undoCopy, undoEquals
 
- 
 
- 
- 
- 
Field Detail- 
_cp1public RMPoint _cp1 
 
- 
 - 
Method Detail- 
setCurvepublic void setCurve(float x1, float y1, float x2, float y2, float x3, float y3)Sets the curve values.
 - 
getPointpublic RMPoint getPoint(double t) Returns the point on this curve at the parametric location t (defined from 0-1).
 - 
getDistanceQuadraticpublic double getDistanceQuadratic(RMPoint aPoint) Returns the minimum distance from the given point to the curve.
 - 
subdividepublic void subdivide(RMQuadratic left, RMQuadratic right) Subdivides this curve into the given left and right curves.
 - 
getMinXpublic float getMinX() Returns the min x point of this bezier.
 - 
getMinYpublic float getMinY() Returns the min y point of this bezier.
 - 
getMaxXpublic float getMaxX() Returns the max x point of this bezier.
 
- 
 
-