RectangleF

Overview

RectangleF is a class in Aspose.PSD FOSS for Java.

Stores a set of four floating-point numbers that represent the location and size of a rectangle.

This class declares 19 methods for RectangleF objects in Java programs. Available methods include: RectangleF, equals, getBottom, getHeight, getLeft, getRight, getTop, getWidth, getX, getY, hashCode, isEmpty, and 5 additional methods. Public members are accessible to any Java application after installing the Aspose.PSD FOSS for Java package. Properties: EMPTY, bottom, empty, height, left, right, and 4 more.

Properties

NameTypeAccessDescription
xfloatRead/WriteGets or sets the x-coordinate of the upper-left corner of this RectangleF.
yfloatRead/WriteGets or sets the y-coordinate of the upper-left corner of this RectangleF.
widthfloatRead/WriteGets or sets the width of this RectangleF.
heightfloatRead/WriteGets or sets the height of this RectangleF.
bottomfloatReadGets the y-coordinate of the bottom edge of this RectangleF.
emptybooleanReadGets a value indicating whether this RectangleF has no location or size.
leftfloatReadGets the x-coordinate of the left edge of this RectangleF.
rightfloatReadGets the x-coordinate of the right edge of this RectangleF.
topfloatReadGets the y-coordinate of the top edge of this RectangleF.
EMPTYRectangleFReadRepresents a RectangleF structure with its properties left uninitialized.

Methods

SignatureDescription
RectangleF(x: float, y: float, width: float, height: float)Initializes a new instance of the RectangleF structure with the specified coordinates.
RectangleF()Initializes a new instance of the RectangleF structure with all properties set to zero.
getX() → floatGets or sets the x-coordinate of the upper-left corner of this RectangleF.
setX(x: float)Sets the x value.
getY() → floatGets or sets the y-coordinate of the upper-left corner of this RectangleF.
setY(y: float)Sets the y value.
getWidth() → floatGets or sets the width of this RectangleF.
setWidth(width: float)Sets the width value.
getHeight() → floatGets or sets the height of this RectangleF.
setHeight(height: float)Sets the height value.
getBottom() → floatGets the y-coordinate of the bottom edge of this RectangleF.
isEmpty() → booleanGets a value indicating whether this RectangleF has no location or size.
getLeft() → floatGets the x-coordinate of the left edge of this RectangleF.
getRight() → floatGets the x-coordinate of the right edge of this RectangleF.
getTop() → floatGets the y-coordinate of the top edge of this RectangleF.
equals(other: RectangleF) → booleanDetermines whether the specified rectangle is equal to this rectangle.
equals(obj: Object) → booleanDetermines whether the specified object is equal to this rectangle.
hashCode() → intReturns a hash code for this rectangle.
toString() → StringReturns a compact coordinate representation.

See Also