public class GRect extends Object
Modifier and Type | Field and Description |
---|---|
static GRect[] |
EMPTY_ARRAY
Empty array of Rect's.
|
static GRect |
ZERO
Zero rectangle.
|
Constructor and Description |
---|
GRect()
Constructor for x=y=cx=cy=0.
|
GRect(int x,
int y,
int cx,
int cy)
Constructor.
|
GRect(String string)
Constructor from a String formatted as "x,y,cx,cy".
|
GRect(Transaction trans)
Constructor from a Transaction.
|
Modifier and Type | Method and Description |
---|---|
void |
append(Transaction trans)
Appends the rectangle to a transaction.
|
boolean |
equals(Object o)
Checks if two rectangles are equal.
|
int |
getCX()
Gets the width.
|
int |
getCY()
Gets the height.
|
int |
getHeight()
Gets the height.
|
int |
getWidth()
Gets the width.
|
int |
getX()
Gets the X position.
|
int |
getY()
Gets the Y position.
|
int |
hashCode()
The hash code.
|
boolean |
isInside(Position p)
Checks if a position is inside.
|
String |
toString()
Formats to a string as "x,y,cx,cy".
|
public static final GRect[] EMPTY_ARRAY
public static final GRect ZERO
public GRect()
public GRect(String string)
string
- The string.IllegalArgumentException
- If the string is not well formatted.public GRect(Transaction trans)
trans
- The transaction.public GRect(int x, int y, int cx, int cy)
x
- X position.y
- Y position.cx
- Width.cy
- Height.public boolean isInside(Position p)
p
- The position.public boolean equals(Object o)
Rect
.public String toString()
public void append(Transaction trans)
trans
- Transaction to append to.public int getX()
public int getY()
public int getCX()
public int getCY()
public int getWidth()
public int getHeight()
iizi® is a registered trademark of Mindus SARL. © Copyright 2019 Mindus SARL. All rights reserved.