public class RMSize
extends com.reportmill.base.RMObject
Constructor and Description |
---|
RMSize()
Creates a size initialized to 0,0.
|
RMSize(java.awt.Dimension d)
Creates a size from a java2D dimension
|
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.lang.String aString)
Creates a size from a string (assumes comma separated).
|
Modifier and Type | Method and Description |
---|---|
RMSize |
abs()
Normalizes the receiver to positive values.
|
boolean |
equals(float w,
float h)
Returns whether size is equal to given width and height.
|
boolean |
equals(java.lang.Object anObj)
Standard equals implementation.
|
float |
magnitude()
Returns the square root of the sum of the squares of the width and height.
|
void |
negate()
Simply sets the width and height to their negatives.
|
RMSize |
normalize()
Normalizes the receiver by scaling its width and height such that its magnitude will be 1.
|
java.lang.String |
toString()
Returns a string representation of size.
|
RMSize |
transform(com.reportmill.graphics.RMTransform aTransform)
Transforms size by given transform (return this for convenience).
|
addListener, addPropertyChangeListener, animUpdate, clone, firePropertyChange, firePropertyChange, getListener, getListenerCount, getListeners, isFirePropertyChangeEnabled, isUndoing, removeListener, removePropertyChangeListener, setFirePropertyChangeEnabled, setUndoing
public RMSize()
public RMSize(double w, double h)
public RMSize(RMSize aSize)
public RMSize(java.awt.Dimension d)
public RMSize(java.lang.String aString)
public RMSize abs()
public float magnitude()
public RMSize normalize()
public void negate()
public RMSize transform(com.reportmill.graphics.RMTransform aTransform)
public boolean equals(java.lang.Object anObj)
equals
in class java.lang.Object
public boolean equals(float w, float h)
public java.lang.String toString()
toString
in class com.reportmill.base.RMObject