Package com.reportmill.graphics
Class RMBezier
- java.lang.Object
- 
- com.reportmill.base.RMObject
- 
- com.reportmill.graphics.RMLine
- 
- com.reportmill.graphics.RMQuadratic
- 
- com.reportmill.graphics.RMBezier
 
 
 
 
- 
- All Implemented Interfaces:
- RMArchiver.Archiving,- java.lang.Cloneable
 
 public class RMBezier extends RMQuadratic This class models a simple bezier curve, providing methods for extracting points, distance calculation, bisection, hit detection and such.
- 
- 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.geom.Rectangle2DgetBounds2D()Returns the bounding box of the shape.doublegetDistanceBezier(RMPoint aPoint)Returns the minimum distance from the given point to the curve.RMHitInfogetHitInfo(RMBezier aBezier)Returns a hit info for this bezier and given bezier.RMHitInfogetHitInfo(RMLine aLine)Returns the hit info for this bezier and a given line.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 a specific point on the curve at the given parametric value (from 0-1).voidsetCurve(RMPoint p1, RMPoint p2, RMPoint p3, RMPoint p4)Sets the values of the curve.voidsetEnd(double t)Reset this curve's end point to the given parametric location (0-1).voidsetStart(double t)Reset this curve's start point to the given parametric location (0-1).voidsubdivide(RMBezier left, RMBezier right, double t)Returns a bezier curve from this curve's start point to the given parametric location (0-1).java.lang.StringtoString()Returns a string representation of this bezier.- 
Methods inherited from class com.reportmill.graphics.RMQuadraticgetDistanceQuadratic, setCurve, setCurve, subdivide
 - 
Methods inherited from class com.reportmill.graphics.RMLinegetDistanceLine, getDistanceToLineSquared, getHead, getHitInfo, getTail
 - 
Methods inherited from class com.reportmill.base.RMObjectclone, copy, didChange, didUndo, getAnimAttribute, getClassNameShort, initWithArchiver, undoClone, undoCopy, undoEquals
 
- 
 
- 
- 
- 
Field Detail- 
_cp2public RMPoint _cp2 
 
- 
 - 
Method Detail- 
setCurvepublic void setCurve(RMPoint p1, RMPoint p2, RMPoint p3, RMPoint p4) Sets the values of the curve.
 - 
getPointpublic RMPoint getPoint(double t) Returns a specific point on the curve at the given parametric value (from 0-1).- Overrides:
- getPointin class- RMQuadratic
 
 - 
getDistanceBezierpublic double getDistanceBezier(RMPoint aPoint) Returns the minimum distance from the given point to the curve.
 - 
getMinXpublic float getMinX() Returns the min x point of this bezier.- Overrides:
- getMinXin class- RMQuadratic
 
 - 
getMinYpublic float getMinY() Returns the min y point of this bezier.- Overrides:
- getMinYin class- RMQuadratic
 
 - 
getMaxXpublic float getMaxX() Returns the max x point of this bezier.- Overrides:
- getMaxXin class- RMQuadratic
 
 - 
getMaxYpublic float getMaxY() Returns the max y point of this bezier.- Overrides:
- getMaxYin class- RMQuadratic
 
 - 
getBounds2Dpublic java.awt.geom.Rectangle2D getBounds2D() Returns the bounding box of the shape.
 - 
getHitInfopublic RMHitInfo getHitInfo(RMLine aLine) Returns the hit info for this bezier and a given line.- Overrides:
- getHitInfoin class- RMLine
 
 - 
getHitInfopublic RMHitInfo getHitInfo(RMBezier aBezier) Returns a hit info for this bezier and given bezier.- Overrides:
- getHitInfoin class- RMLine
 
 - 
subdividepublic void subdivide(RMBezier left, RMBezier right, double t) Returns a bezier curve from this curve's start point to the given parametric location (0-1).
 - 
setEndpublic void setEnd(double t) Reset this curve's end point to the given parametric location (0-1).
 - 
setStartpublic void setStart(double t) Reset this curve's start point to the given parametric location (0-1).
 
- 
 
-