Package com.reportmill.graphics
Class RMLine
- java.lang.Object
- 
- com.reportmill.base.RMObject
- 
- com.reportmill.graphics.RMLine
 
 
- 
- All Implemented Interfaces:
- RMArchiver.Archiving,- java.lang.Cloneable
 - Direct Known Subclasses:
- RMQuadratic
 
 public class RMLine extends RMObject This class models a simple line, providing methods for extracting points, distance calculation, bisection, hit detection and such.
- 
- 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description doublegetDistanceLine(RMPoint aPoint)Returns the minimum distance from the given point to this line.static doublegetDistanceToLineSquared(double p0x, double p0y, double p1x, double p1y, double p2x, double p2y)Returns the distance from the given point components (p0) to the given line components (p1->p2).RMLinegetHead(double t)Returns a new line from this line's start point to given parametric location t (defined from 0-1) on this line.RMHitInfogetHitInfo(RMBezier aBezier)Returns a hit info object for this line and the given bezier.RMHitInfogetHitInfo(RMLine aLine)Returns a hit info object for this line and the given line.RMHitInfogetHitInfo(RMQuadratic aCurve)Returns a hit info object for this line and the given bezier curve.floatgetMaxX()Returns the max x point of this line.floatgetMaxY()Returns the max y point of this line.floatgetMinX()Returns the min x point of this line.floatgetMinY()Returns the min y point of this line.RMPointgetPoint(double t)Returns the point on this line at the parametric location t (defined from 0-1).RMLinegetTail(double t)Returns a new line from given parametric location t (defined from 0-1) on this line to this line's end point.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).java.lang.StringtoString()Returns a string representation of this line.- 
Methods inherited from class com.reportmill.base.RMObjectclone, copy, didChange, didUndo, getAnimAttribute, getClassNameShort, initWithArchiver, undoClone, undoCopy, undoEquals
 
- 
 
- 
- 
- 
Method Detail- 
getPointpublic RMPoint getPoint(double t) Returns the point on this line at the parametric location t (defined from 0-1).
 - 
getDistanceLinepublic double getDistanceLine(RMPoint aPoint) Returns the minimum distance from the given point to this line.
 - 
getDistanceToLineSquaredpublic static double getDistanceToLineSquared(double p0x, double p0y, double p1x, double p1y, double p2x, double p2y)Returns the distance from the given point components (p0) to the given line components (p1->p2).
 - 
getMinXpublic float getMinX() Returns the min x point of this line.
 - 
getMinYpublic float getMinY() Returns the min y point of this line.
 - 
getMaxXpublic float getMaxX() Returns the max x point of this line.
 - 
getMaxYpublic float getMaxY() Returns the max y point of this line.
 - 
getHeadpublic RMLine getHead(double t) Returns a new line from this line's start point to given parametric location t (defined from 0-1) on this line.
 - 
getTailpublic RMLine getTail(double t) Returns a new line from given parametric location t (defined from 0-1) on this line to this line's end point.
 - 
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).
 - 
getHitInfopublic RMHitInfo getHitInfo(RMLine aLine) Returns a hit info object for this line and the given line.
 - 
getHitInfopublic RMHitInfo getHitInfo(RMQuadratic aCurve) Returns a hit info object for this line and the given bezier curve. HitInfo._index is overloaded to contain number of hits.
 - 
getHitInfopublic RMHitInfo getHitInfo(RMBezier aBezier) Returns a hit info object for this line and the given bezier.
 - 
toStringpublic java.lang.String toString() Returns a string representation of this line.- Overrides:
- toStringin class- java.lang.Object
 
 
- 
 
-