PolygonShape Class
Contents
[
Hide
]Summary: Represents a polygon shape.
Module: aspose.psd.shapes
Full Name: aspose.psd.shapes.PolygonShape
Inheritance: IOrderedShape, Shape
Aspose.PSD Version: 24.9.0
Constructors
Name | Description |
---|---|
PolygonShape() | Initializes a new instance of the PolygonShape class. |
PolygonShape(points) | Initializes a new instance of the PolygonShape class. |
PolygonShape(points, is_closed) | Initializes a new instance of the PolygonShape class. |
Properties
Name | Type | Access | Description |
---|---|---|---|
bounds | RectangleF | r | Gets the object’s bounds. |
center | PointF | r | Gets the shape’s center. |
end_point | PointF | r | Gets the ending shape point. |
has_segments | bool | r | Gets a value indicating whether shape has segments. |
is_closed | bool | r/w | Gets or sets a value indicating whether shape is closed. |
points | PointF[] | r/w | Gets or sets the curve points. |
segments | ShapeSegment[] | r | Gets the shape segments. |
start_point | PointF | r | Gets the starting shape point. |
Methods
Name | Description |
---|---|
get_bounds(matrix) | Gets the object’s bounds. |
get_bounds(matrix, pen) | Gets the object’s bounds. |
reverse() | Reverses the order of points for this shape. |
transform(transform) | Applies the specified transformation to the shape. |
Constructor: PolygonShape()
PolygonShape()
Initializes a new instance of the PolygonShape class.
Constructor: PolygonShape(points)
PolygonShape(points)
Initializes a new instance of the PolygonShape class.
Parameters:
Parameter | Type | Description |
---|---|---|
points | PointF[] | The points array. |
Constructor: PolygonShape(points, is_closed)
PolygonShape(points, is_closed)
Initializes a new instance of the PolygonShape class.
Parameters:
Parameter | Type | Description |
---|---|---|
points | PointF[] | The points array. |
is_closed | bool | If set to |
Method: get_bounds(matrix)
get_bounds(matrix)
Gets the object’s bounds.
Parameters:
Parameter | Type | Description |
---|---|---|
matrix | Matrix | The matrix to apply before bounds will be calculated. |
Returns
Type | Description |
---|---|
RectangleF | The estimated object’s bounds. |
Method: get_bounds(matrix, pen)
get_bounds(matrix, pen)
Gets the object’s bounds.
Parameters:
Parameter | Type | Description |
---|---|---|
matrix | Matrix | The matrix to apply before bounds will be calculated. |
pen | Pen | The pen to use for object. This can influence the object’s bounds size. |
Returns
Type | Description |
---|---|
RectangleF | The estimated object’s bounds. |
Method: transform(transform)
transform(transform)
Applies the specified transformation to the shape.
Parameters:
Parameter | Type | Description |
---|---|---|
transform | Matrix | The transformation to apply. |