GP.Attributes
Class Size
java.lang.Object
|
+--GP.Attributes.Size
- Direct Known Subclasses:
- CenterToCorner, OffsetFrom, PositionToPosition, Proportional, Random, Shape
- public class Size
- extends java.lang.Object
Constructor Summary |
Size()
Constructs Size with default value of 0x0 pixels. |
Size(double size)
Constructs Size with given value for both width and height. |
Size(double width,
double height)
Constructs Size with given values. |
Size(Position center,
Position corner)
Construct a size by taking the center position and corner position
and calculating the size of the object based on that information. |
Size(Size size)
Constructs Size with identical values of given Size. |
Size(Value size)
Constructs Size with given value for both width and height. |
Size(Value width,
Value height)
Constructs Size with given values. |
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Size
public Size()
- Constructs Size with default value of 0x0 pixels.
Size
public Size(double width,
double height)
throws GP.Exceptions.NegativeWidth,
GP.Exceptions.NegativeHeight
- Constructs Size with given values.
- Parameters:
width
- in pixels, must be greater than zeroheight
- in pixels, must be greater than zero
Size
public Size(double size)
throws GP.Exceptions.NegativeWidth,
GP.Exceptions.NegativeHeight
- Constructs Size with given value for both width and height.
- Parameters:
size
- of width and height in pixels, must be greater than zero
Size
public Size(Value size)
throws GP.Exceptions.NegativeWidth,
GP.Exceptions.NegativeHeight
- Constructs Size with given value for both width and height.
- Parameters:
size
- of width and height in pixels, must be greater than zero
Size
public Size(Value width,
Value height)
throws GP.Exceptions.NegativeWidth,
GP.Exceptions.NegativeHeight
- Constructs Size with given values.
- Parameters:
width
- in pixels, must be greater than zeroheight
- in pixels, must be greater than zero
Size
public Size(Size size)
- Constructs Size with identical values of given Size.
- Parameters:
size
- another size
Size
public Size(Position center,
Position corner)
- Construct a size by taking the center position and corner position
and calculating the size of the object based on that information.
- Parameters:
center
- a position on the screencorner
- a position on the screen
Copy
public Size Copy()
GetWidth
public double GetWidth()
GetHeight
public double GetHeight()
GetWidthValue
public Value GetWidthValue()
GetHeightValue
public Value GetHeightValue()
Difference
public Size Difference(Size size)
Sum
public Size Sum(Size size)
equals
public boolean equals(java.lang.Object other)
- Overrides:
equals
in class java.lang.Object
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
toHTMLString
public java.lang.String toHTMLString()