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:
- Serializable,- Cloneable
This class extends Point2D.Float to add a few convenience methods.
- See Also:
- 
Nested Class SummaryNested classes/interfaces inherited from class java.awt.geom.Point2DPoint2D.Double, Point2D.Float
- 
Field SummaryFieldsFields inherited from class java.awt.geom.Point2D.Doublex, y
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionAdds the given point to this point.booleanStandard equals implementation.static RMPointReturns an RMPoint version of the given Point2D (just the Point2D if it's already an RMPoint).booleanReturns whether the receiver is in the given rect.voidmultiply(double sx, double sy) Multiplies this point by the given sx and sy.offset(double dx, double 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.DoublegetX, getY, setLocationMethods inherited from class java.awt.geom.Point2Dclone, distance, distance, distance, distanceSq, distanceSq, distanceSq, equals, hashCode, setLocation
- 
Field Details- 
zeroPoint
 
- 
- 
Constructor Details- 
RMPointpublic RMPoint()Creates a point initialized to 0,0.
- 
RMPointpublic RMPoint(double x1, double y1) Creates a point initialized to the given x and y.
- 
RMPointCreates a point initialized to the given AWT Point.
 
- 
- 
Method Details- 
offsetOffsets the receiver by the given x and y.
- 
addAdds the given point to this point.
- 
subtractSubtracts the given point from this point.
- 
multiplypublic void multiply(double sx, double sy) Multiplies this point by the given sx and sy.
- 
inRectReturns whether the receiver is in the given rect.
- 
transformTransforms the point by the given transform.
- 
equalsStandard equals implementation.
- 
toStringReturns a string representation of the receiver in the form "[x y]".- Overrides:
- toStringin class- Point2D.Double
 
- 
getPointReturns an RMPoint version of the given Point2D (just the Point2D if it's already an RMPoint).
 
-