Package com.reportmill.base
Class RMSize
- java.lang.Object
- 
- com.reportmill.base.RMObject
- 
- com.reportmill.base.RMSize
 
 
- 
- All Implemented Interfaces:
- RMArchiver.Archiving,- java.lang.Cloneable
 
 public class RMSize extends RMObject This class represents a simple geometric size (width, height).
- 
- 
Constructor SummaryConstructors Constructor Description RMSize()Creates a size initialized to 0,0.RMSize(double w, double h)Creates a size initialized to the given width and height.RMSize(RMSize aSize)Creates a size initialized to the given size.RMSize(java.awt.Dimension d)Creates a size from a java2D dimension
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description RMSizeabs()Normalizes the receiver to positive values.booleanequals(float w, float h)Returns whether size is equal to given width and height.booleanequals(java.lang.Object anObj)Standard equals implementation.floatmagnitude()Returns the square root of the sum of the squares of the width and height.voidnegate()Simply sets the width and height to their negatives.RMSizenormalize()Normalizes the receiver by scaling its width and height such that its magnitude will be 1.RMSizetransform(RMTransform aTransform)Transforms size by given transform (return this for convenience).- 
Methods inherited from class com.reportmill.base.RMObjectclone, copy, didChange, didUndo, getAnimAttribute, getClassNameShort, initWithArchiver, undoClone, undoCopy, undoEquals
 
- 
 
- 
- 
- 
Constructor Detail- 
RMSizepublic RMSize() Creates a size initialized to 0,0.
 - 
RMSizepublic RMSize(double w, double h)Creates a size initialized to the given width and height.
 - 
RMSizepublic RMSize(RMSize aSize) Creates a size initialized to the given size.
 - 
RMSizepublic RMSize(java.awt.Dimension d) Creates a size from a java2D dimension
 
- 
 - 
Method Detail- 
abspublic RMSize abs() Normalizes the receiver to positive values.
 - 
magnitudepublic float magnitude() Returns the square root of the sum of the squares of the width and height.
 - 
normalizepublic RMSize normalize() Normalizes the receiver by scaling its width and height such that its magnitude will be 1.
 - 
negatepublic void negate() Simply sets the width and height to their negatives.
 - 
transformpublic RMSize transform(RMTransform aTransform) Transforms size by given transform (return this for convenience).
 - 
equalspublic boolean equals(java.lang.Object anObj) Standard equals implementation.- Overrides:
- equalsin class- java.lang.Object
 
 - 
equalspublic boolean equals(float w, float h)Returns whether size is equal to given width and height.
 
- 
 
-