Rectangle

Overview

Rectangle is a class in Aspose.PDF FOSS for Java. Inherits from: Shape.

Represents a rectangle drawing shape.

This class provides 12 methods for working with Rectangle objects in Java programs. Available methods include: Rectangle, checkBounds, getBottom, getHeight, getLeft, getRoundedCornerRadius, getWidth, setBottom, setHeight, setLeft, setRoundedCornerRadius, setWidth. All public members are accessible to any Java application after installing the Aspose.PDF FOSS for Java package. Properties: bottom, height, left, roundedCornerRadius, width.

Properties

NameTypeAccessDescription
leftfloatReadGets the x-coordinate of the lower-left corner.
bottomfloatReadGets the y-coordinate of the lower-left corner.
widthfloatReadGets the width of the rectangle.
heightfloatReadGets the height of the rectangle.
roundedCornerRadiusfloatReadGets the corner radius for rounded rectangles.

Methods

SignatureDescription
Rectangle(left: float, bottom: float, width: float, height: float)Creates a new rectangle with the specified position and dimensions.
getLeft()floatGets the x-coordinate of the lower-left corner.
setLeft(left: float)Sets the x-coordinate of the lower-left corner.
getBottom()floatGets the y-coordinate of the lower-left corner.
setBottom(bottom: float)Sets the y-coordinate of the lower-left corner.
getWidth()floatGets the width of the rectangle.
setWidth(width: float)Sets the width of the rectangle.
getHeight()floatGets the height of the rectangle.
setHeight(height: float)Sets the height of the rectangle.
getRoundedCornerRadius()floatGets the corner radius for rounded rectangles.
setRoundedCornerRadius(roundedCornerRadius: float)Sets the corner radius for rounded rectangles.
checkBounds(containerWidth: double, containerHeight: double){@inheritDoc}
/

See Also

 English