Package com.inductiveautomation.rm.base
Class RMPoint
- java.lang.Object
-
- java.awt.geom.Point2D
-
- java.awt.geom.Point2D.Double
-
- com.inductiveautomation.rm.base.RMPoint
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable
public class RMPoint extends java.awt.geom.Point2D.DoubleThis class extends Point2D.Float to add a few convenience methods.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description RMPointadd(RMPoint aPoint)Adds the given point to this point.booleanequals(RMPoint aPoint)Standard equals implementation.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(double dx, double 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
-
zeroPoint
public static final RMPoint zeroPoint
-
-
Method Detail
-
offset
public RMPoint offset(double dx, double dy)
Offsets the receiver by the given x and y.
-
multiply
public void multiply(double sx, double sy)Multiplies this point by the given sx and sy.
-
inRect
public boolean inRect(RMRect aRect)
Returns whether the receiver is in the given rect.
-
transform
public RMPoint transform(RMTransform aTransform)
Transforms the point by the given transform.
-
equals
public boolean equals(RMPoint aPoint)
Standard equals implementation.
-
toString
public java.lang.String toString()
Returns a string representation of the receiver in the form "[x y]".- Overrides:
toStringin classjava.awt.geom.Point2D.Double
-
getPoint
public 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).
-
-