Represents a rectangle, which may be represented using integer or real values
Property: bottom
Gets or sets the bottom coordinate of the rectangle
Method: center
Returns a point representing the center of the rectangle. If the rectangle contains only integer values, the point will be rounded to the nearest integer position, otherwise a real point is returned
Property: height
Gets or sets the height of the rectangle, i.e. sets bottom = top + height
Method: inset
Inset (reduce size) of the rectangle by the given amount, or increase it if negative values are given
void inset(x);
void inset(x, y);
Parameters | ||
---|---|---|
Name | Expected Type | Description |
y | int | amount to inset top and bottom. If negative, the dimensions are expanded. If y is not specified, it is the same as x |
x | int | amount to inset left and right. If negative, the dimensions are expanded |
Property: isReal
Returns true if either of the coordinates contains a real value, false if both are integers
Property: left
Gets or sets the left coordinate of the rectangle
Property: right
Gets or sets the right coordinate of the rectangle
Property: top
Gets or sets the top coordinate of the rectangle
Property: width
Gets or sets the width of the rectangle, i.e. sets right = left + width