RectangleProjectedShape

Inheritance: java.lang.Object, com.aspose.imaging.ObjectWithBounds, com.aspose.imaging.Shape

public abstract class RectangleProjectedShape extends Shape

Represents a shape which is projected over rectangle turned to a particular orientation. Specified by four points which can be rotated in space maintaining the same edges length and 90 degrees between adjacent edges.

Constructors

ConstructorDescription
RectangleProjectedShape()Initializes a new instance of the RectangleProjectedShape class.
RectangleProjectedShape(RectangleF rectangle)Initializes a new instance of the RectangleProjectedShape class.

Methods

MethodDescription
getLeftTop()Gets the left top rectangle point.
getRightTop()Gets the right top rectangle point.
getLeftBottom()Gets the left bottom rectangle point.
getRightBottom()Gets the right bottom rectangle point.
getCenter()Gets the shape’s center.
getBounds()Gets the object’s bounds.
getRectangleWidth()Gets the rectangle width.
getRectangleHeight()Gets the rectangle height.
hasSegments()Gets a value indicating whether shape has segments.
getBounds(Matrix matrix)Gets the object’s bounds.
getBounds(Matrix matrix, Pen pen)Gets the object’s bounds.
transform(Matrix transform)Applies the specified transformation to the shape.
equals(Object obj)Determines whether the specified Object is equal to this instance.
hashCode()Returns a hash code for this instance.

RectangleProjectedShape()

public RectangleProjectedShape()

Initializes a new instance of the RectangleProjectedShape class.

RectangleProjectedShape(RectangleF rectangle)

public RectangleProjectedShape(RectangleF rectangle)

Initializes a new instance of the RectangleProjectedShape class.

Parameters:

ParameterTypeDescription
rectangleRectangleFThe rectangle to initialize from.

getLeftTop()

public PointF getLeftTop()

Gets the left top rectangle point.

Value: The left top rectangle point.

Returns: PointF

getRightTop()

public PointF getRightTop()

Gets the right top rectangle point.

Value: The right top rectangle point.

Returns: PointF

getLeftBottom()

public PointF getLeftBottom()

Gets the left bottom rectangle point.

Value: The left bottom rectangle point.

Returns: PointF

getRightBottom()

public PointF getRightBottom()

Gets the right bottom rectangle point.

Value: The right bottom rectangle point.

Returns: PointF

getCenter()

public PointF getCenter()

Gets the shape’s center.

Value: The shape’s center.

Returns: PointF

getBounds()

public RectangleF getBounds()

Gets the object’s bounds.

Value: The object’s bounds.

Returns: RectangleF

getRectangleWidth()

public double getRectangleWidth()

Gets the rectangle width.

Value: The rectangle width.

Returns: double

getRectangleHeight()

public double getRectangleHeight()

Gets the rectangle height.

Value: The rectangle height.

Returns: double

hasSegments()

public boolean hasSegments()

Gets a value indicating whether shape has segments.

Value: True if shape has segments; otherwise, false.

Returns: boolean

getBounds(Matrix matrix)

public RectangleF getBounds(Matrix matrix)

Gets the object’s bounds.

Parameters:

ParameterTypeDescription
matrixMatrixThe matrix to apply before bounds will be calculated.

Returns: RectangleF - The estimated object’s bounds.

getBounds(Matrix matrix, Pen pen)

public RectangleF getBounds(Matrix matrix, Pen pen)

Gets the object’s bounds.

Parameters:

ParameterTypeDescription
matrixMatrixThe matrix to apply before bounds will be calculated.
penPenThe pen to use for object. This can influence the object’s bounds size.

Returns: RectangleF - The estimated object’s bounds.

transform(Matrix transform)

public void transform(Matrix transform)

Applies the specified transformation to the shape.

Parameters:

ParameterTypeDescription
transformMatrixThe transformation to apply.

equals(Object obj)

public boolean equals(Object obj)

Determines whether the specified Object is equal to this instance.

Parameters:

ParameterTypeDescription
objjava.lang.ObjectThe Object to compare with this instance.

Returns: boolean - true if the specified Object is equal to this instance; otherwise, false.

hashCode()

public int hashCode()

Returns a hash code for this instance.

Returns: int - A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.