Figure Class
Contents
[
Hide
]Summary: The figure. A container for shapes.
Module: aspose.psd
Full Name: aspose.psd.Figure
Inheritance: ObjectWithBounds
Aspose.PSD Version: 24.9.0
Constructors
Name | Description |
---|---|
Figure() | Initializes a new instance of the Figure class |
Properties
Name | Type | Access | Description |
---|---|---|---|
bounds | RectangleF | r | Gets or sets the object’s bounds. |
is_closed | bool | r/w | Gets or sets a value indicating whether this figure is closed. A closed figure will make a difference only in case where the first and the last figure’s shapes are continuous shapes. In such case the first point of the first shape will be connected by a straight line from the last point of the last shape. |
segments | ShapeSegment[] | r | Gets the whole figure segments. |
shapes | Shape[] | r | Gets the figure shapes. |
Methods
Name | Description |
---|---|
add_shape(shape) | Adds a shape to the figure. |
add_shapes(shapes) | Adds a range of shapes to the figure. |
get_bounds(matrix) | Gets the object’s bounds. |
get_bounds(matrix, pen) | Gets the object’s bounds. |
remove_shape(shape) | Removes a shape from the figure. |
remove_shapes(shapes) | Removes a range of shapes from the figure. |
reverse() | Reverses this figure shapes order and shapes point order. |
transform(transform) | Applies the specified transformation to the shape. |
Constructor: Figure()
Figure()
Initializes a new instance of the Figure class
Method: add_shape(shape)
add_shape(shape)
Adds a shape to the figure.
Parameters:
Parameter | Type | Description |
---|---|---|
shape | Shape | The shape to add. |
Method: add_shapes(shapes)
add_shapes(shapes)
Adds a range of shapes to the figure.
Parameters:
Parameter | Type | Description |
---|---|---|
shapes | Shape[] | The shapes to add. |
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: remove_shape(shape)
remove_shape(shape)
Removes a shape from the figure.
Parameters:
Parameter | Type | Description |
---|---|---|
shape | Shape | The shape to remove. |
Method: remove_shapes(shapes)
remove_shapes(shapes)
Removes a range of shapes from the figure.
Parameters:
Parameter | Type | Description |
---|---|---|
shapes | Shape[] | The shapes range to remove. |
Method: transform(transform)
transform(transform)
Applies the specified transformation to the shape.
Parameters:
Parameter | Type | Description |
---|---|---|
transform | Matrix | The transformation to apply. |