A class used elsewhere in Sofia that holds two float coordinates representing the width and height of an object.
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
float
|
height
|
The height. | |||||||||
float
|
width
|
The width. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
SizeF()
Creates a
SizeF with a width and height of zero. | ||||||||||
|
SizeF(float width, float height)
Creates a
SizeF with the specified width and height. | ||||||||||
|
SizeF(SizeF size)
Creates a
SizeF with values copied from the specified size. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
boolean
|
equals(Object other)
| ||||||||||
boolean
|
equals(float otherWidth, float otherHeight)
Gets a value indicating whether the receiver has the specified width and
height.
| ||||||||||
int
|
hashCode()
| ||||||||||
float
|
length()
Gets the Euclidean distance from (0, 0) to the point indicated by the
width and height of the receiver.
| ||||||||||
void
|
set(float newWidth, float newHeight)
Sets the width and height of the size.
| ||||||||||
void
|
set(SizeF size)
Sets the size's width and height to those from the specified size.
| ||||||||||
String
|
toString()
Gets a human-readable string representation of the size.
|
Methods inherited from
class
java.lang.Object
| |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Object
|
clone()
| ||||||||||
boolean
|
equals(Object arg0)
| ||||||||||
void
|
finalize()
| ||||||||||
final
Class<?>
|
getClass()
| ||||||||||
int
|
hashCode()
| ||||||||||
final
void
|
notify()
| ||||||||||
final
void
|
notifyAll()
| ||||||||||
String
|
toString()
| ||||||||||
final
void
|
wait()
| ||||||||||
final
void
|
wait(long arg0, int arg1)
| ||||||||||
final
void
|
wait(long arg0)
|
The height.
The width.
Creates a SizeF
with a width and height of zero.
Creates a SizeF
with the specified width and height.
Creates a SizeF
with values copied from the specified size.
Gets a value indicating whether the receiver has the specified width and height.
true if the receiver has the specified width and height, otherwise false
Gets the Euclidean distance from (0, 0) to the point indicated by the width and height of the receiver.
the Euclidean distance from (0, 0) to (width, height)
Sets the width and height of the size.
Sets the size's width and height to those from the specified size.
Gets a human-readable string representation of the size.
a human-readable string representation of the size