RectangleOffset Class
Defines offsets from shape edges.
Declaration
public final class RectangleOffset extends Struct<RectangleOffset> implements Cloneable
Implements
Inherited Members
Inheritance
Constructors
RectangleOffset() Constructor
Initializes a new instance of the RectangleOffset class.
Declaration
public RectangleOffset()
RectangleOffset(float left, float top, float right, float bottom) Constructor
Initializes a new instance of the RectangleOffset class with specified settings.
Declaration
public RectangleOffset(float left, float top, float right, float bottom)
Parameters
| Name | Type | Description |
|---|---|---|
| left | float | Specifies the left offset. |
| top | float | Specifies the top offset. |
| right | float | Specifies the right offset. |
| bottom | float | Specifies the bottom offset. |
RectangleOffset(float left, float top, float right) Constructor
Initializes a new instance of the RectangleOffset class with specified settings.
Declaration
public RectangleOffset(float left, float top, float right)
Parameters
| Name | Type | Description |
|---|---|---|
| left | float | Specifies the left offset. |
| top | float | Specifies the top offset. |
| right | float | Specifies the right offset. |
RectangleOffset(float left, float top) Constructor
Initializes a new instance of the RectangleOffset class with specified settings.
Declaration
public RectangleOffset(float left, float top)
Parameters
| Name | Type | Description |
|---|---|---|
| left | float | Specifies the left offset. |
| top | float | Specifies the top offset. |
RectangleOffset(float left) Constructor
Initializes a new instance of the RectangleOffset class with specified settings.
Declaration
public RectangleOffset(float left)
Parameters
| Name | Type | Description |
|---|---|---|
| left | float | Specifies the left offset. |
RectangleOffset(RectangleOffset other) Constructor
Initializes a new instance of the RectangleOffset class with specified settings.
Declaration
public RectangleOffset(RectangleOffset other)
Parameters
| Name | Type | Description |
|---|---|---|
| other | RectangleOffset |
Specifies the rectangle offset to copy. |
Methods
clone() Method
Creates a copy of the current RectangleOffset object.
Declaration
public RectangleOffset clone()
Returns
| Type | Description |
|---|---|
RectangleOffset |
A copy of the current rectangle offset. |
equals(Object obj) Method
Determines whether the specified object is equal to this rectangle offset.
Declaration
public boolean equals(Object obj)
Parameters
| Name | Type | Description |
|---|---|---|
| obj | Object | The object to compare with this rectangle offset. |
Returns
| Type | Description |
|---|---|
| boolean |
|
getBottom() Method
Returns the offset from the bottom edge of the shape.
Declaration
public float getBottom()
Returns
| Type | Description |
|---|---|
| float | The offset (as a percentage) from the edges of a shape’s bounding box. A positive value indicates an inset and a negative value specifies an outset. |
getLeft() Method
Returns the offset from the left edge of the shape.
Declaration
public float getLeft()
Returns
| Type | Description |
|---|---|
| float | The offset (as a percentage) from the edges of a shape’s bounding box. A positive value indicates an inset and a negative value specifies an outset. |
getRight() Method
Returns the offset from the right edge of the shape.
Declaration
public float getRight()
Returns
| Type | Description |
|---|---|
| float | The offset (as a percentage) from the edges of a shape’s bounding box. A positive value indicates an inset and a negative value specifies an outset. |
getTop() Method
Returns the offset from the top edge of the shape.
Declaration
public float getTop()
Returns
| Type | Description |
|---|---|
| float | The offset (as a percentage) from the edges of a shape’s bounding box. A positive value indicates an inset and a negative value specifies an outset. |
hashCode() Method
Returns a hash code value for this rectangle offset.
Declaration
public int hashCode()
Returns
| Type | Description |
|---|---|
| int | The hash code. |
setBottom(float value) Method
Sets the offset from the bottom edge of the shape.
Declaration
public void setBottom(float value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | float | The offset (as a percentage) from the edges of a shape’s bounding box. A positive value indicates an inset and a negative value specifies an outset. |
setLeft(float value) Method
Sets the offset from the left edge of the shape.
Declaration
public void setLeft(float value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | float | The offset (as a percentage) from the edges of a shape’s bounding box. A positive value indicates an inset and a negative value specifies an outset. |
setRight(float value) Method
Sets the offset from the right edge of the shape.
Declaration
public void setRight(float value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | float | The offset (as a percentage) from the edges of a shape’s bounding box. A positive value indicates an inset and a negative value specifies an outset. |
setTop(float value) Method
Sets the offset from the top edge of the shape.
Declaration
public void setTop(float value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | float | The offset (as a percentage) from the edges of a shape’s bounding box. A positive value indicates an inset and a negative value specifies an outset. |