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:
Serializable
,Cloneable
This class extends Point2D.Float to add a few convenience methods.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.awt.geom.Point2D
Point2D.Double, Point2D.Float
-
Field Summary
FieldsFields inherited from class java.awt.geom.Point2D.Float
x, y
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdds the given point to this point.static RMPoint
Returns an RMPoint version of the given Point2D (just the Point2D if it's already an RMPoint).boolean
Returns whether the receiver is in the given rect.void
multiply
(double sx, double sy) Multiplies this point by the given sx and sy.offset
(float dx, float dy) Offsets the receiver by the given x and y.Subtracts the given point from this point.toString()
Returns a string representation of the receiver in the form "[x y]".transform
(RMTransform aTransform) Transforms the point by the given transform.Methods inherited from class java.awt.geom.Point2D.Float
getX, getY, setLocation, setLocation
Methods inherited from class java.awt.geom.Point2D
clone, distance, distance, distance, distanceSq, distanceSq, distanceSq, equals, hashCode, setLocation
-
Field Details
-
zeroPoint
-
-
Constructor Details
-
RMPoint
public RMPoint()Creates a point initialized to 0,0. -
RMPoint
public RMPoint(float x1, float y1) Creates a point initialized to the given x and y (float). -
RMPoint
public RMPoint(double x1, double y1) Creates a point initialized to the given x and y (double). -
RMPoint
Creates a point initialized to the given AWT Point.
-
-
Method Details
-
offset
Offsets the receiver by the given x and y. -
add
Adds the given point to this point. -
subtract
Subtracts the given point from this point. -
multiply
public void multiply(double sx, double sy) Multiplies this point by the given sx and sy. -
inRect
Returns whether the receiver is in the given rect. -
transform
Transforms the point by the given transform. -
toString
Returns a string representation of the receiver in the form "[x y]".- Overrides:
toString
in classPoint2D.Float
-
getPoint
Returns an RMPoint version of the given Point2D (just the Point2D if it's already an RMPoint).
-