Package com.reportmill.base
Class RMPoint
- java.lang.Object
- 
- java.awt.geom.Point2D
- 
- java.awt.geom.Point2D.Float
- 
- com.reportmill.base.RMPoint
 
 
 
- 
- All Implemented Interfaces:
- java.io.Serializable,- java.lang.Cloneable
 
 public class RMPoint extends java.awt.geom.Point2D.FloatThis class extends Point2D.Float to add a few convenience methods.- See Also:
- Serialized Form
 
- 
- 
Constructor SummaryConstructors Constructor Description RMPoint()Creates a point initialized to 0,0.RMPoint(double x1, double y1)Creates a point initialized to the given x and y (double).RMPoint(float x1, float y1)Creates a point initialized to the given x and y (float).RMPoint(java.awt.geom.Point2D aPoint)Creates a point initialized to the given AWT Point.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description RMPointadd(RMPoint aPoint)Adds the given point to this point.static RMPointgetPoint(java.awt.geom.Point2D aPoint)Returns an RMPoint version of the given Point2D (just the Point2D if it's already an RMPoint).booleaninRect(RMRect aRect)Returns whether the receiver is in the given rect.voidmultiply(double sx, double sy)Multiplies this point by the given sx and sy.RMPointoffset(float dx, float dy)Offsets the receiver by the given x and y.RMPointsubtract(RMPoint aPoint)Subtracts the given point from this point.java.lang.StringtoString()Returns a string representation of the receiver in the form "[x y]".RMPointtransform(RMTransform aTransform)Transforms the point by the given transform.
 
- 
- 
- 
Field Detail- 
zeroPointpublic static final RMPoint zeroPoint 
 
- 
 - 
Constructor Detail- 
RMPointpublic RMPoint() Creates a point initialized to 0,0.
 - 
RMPointpublic RMPoint(float x1, float y1)Creates a point initialized to the given x and y (float).
 - 
RMPointpublic RMPoint(double x1, double y1)Creates a point initialized to the given x and y (double).
 - 
RMPointpublic RMPoint(java.awt.geom.Point2D aPoint) Creates a point initialized to the given AWT Point.
 
- 
 - 
Method Detail- 
offsetpublic RMPoint offset(float dx, float dy) Offsets the receiver by the given x and y.
 - 
multiplypublic void multiply(double sx, double sy)Multiplies this point by the given sx and sy.
 - 
inRectpublic boolean inRect(RMRect aRect) Returns whether the receiver is in the given rect.
 - 
transformpublic RMPoint transform(RMTransform aTransform) Transforms the point by the given transform.
 - 
toStringpublic java.lang.String toString() Returns a string representation of the receiver in the form "[x y]".- Overrides:
- toStringin class- java.awt.geom.Point2D.Float
 
 - 
getPointpublic static RMPoint getPoint(java.awt.geom.Point2D aPoint) Returns an RMPoint version of the given Point2D (just the Point2D if it's already an RMPoint).
 
- 
 
-