CurveShape Class

Summary: Represents a curved spline shape.

Module: aspose.psd.shapes

Full Name: aspose.psd.shapes.CurveShape

Inheritance: IOrderedShape, PolygonShape

Aspose.PSD Version: 24.9.0

Constructors

NameDescription
CurveShape()Initializes a new instance of the CurveShape class.
CurveShape(points)Initializes a new instance of the CurveShape class. The default tension of 0.5 is used.
CurveShape(points, is_closed)Initializes a new instance of the CurveShape class. The default tension of 0.5 is used.
CurveShape(points, tension)Initializes a new instance of the CurveShape class.
CurveShape(points, tension, is_closed)Initializes a new instance of the CurveShape class.

Properties

NameTypeAccessDescription
boundsRectangleFrGets the object’s bounds.
centerPointFrGets the shape’s center.
end_pointPointFrGets the ending shape point.
has_segmentsboolrGets a value indicating whether shape has segments.
is_closedboolr/wGets or sets a value indicating whether shape is closed.
pointsPointF[]r/wGets or sets the curve points.
segmentsShapeSegment[]rGets the shape segments.
start_pointPointFrGets the starting shape point.
tensionfloatr/wGets or sets the curve tension.

Methods

NameDescription
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: CurveShape()

 CurveShape() 

Initializes a new instance of the CurveShape class.

Constructor: CurveShape(points)

 CurveShape(points) 

Initializes a new instance of the CurveShape class. The default tension of 0.5 is used.

Parameters:

ParameterTypeDescription
pointsPointF[]The points array.

Constructor: CurveShape(points, is_closed)

 CurveShape(points, is_closed) 

Initializes a new instance of the CurveShape class. The default tension of 0.5 is used.

Parameters:

ParameterTypeDescription
pointsPointF[]The points array.
is_closedboolif set to true the curve is closed.

Constructor: CurveShape(points, tension)

 CurveShape(points, tension) 

Initializes a new instance of the CurveShape class.

Parameters:

ParameterTypeDescription
pointsPointF[]The points array.
tensionfloatThe curve tension.

Constructor: CurveShape(points, tension, is_closed)

 CurveShape(points, tension, is_closed) 

Initializes a new instance of the CurveShape class.

Parameters:

ParameterTypeDescription
pointsPointF[]The points array.
tensionfloatThe curve tension.
is_closedboolif set to true the curve is closed.

Method: get_bounds(matrix)

 get_bounds(matrix) 

Gets the object’s bounds.

Parameters:

ParameterTypeDescription
matrixMatrixThe matrix to apply before bounds will be calculated.

Returns

TypeDescription
RectangleFThe estimated object’s bounds.

Method: get_bounds(matrix, pen)

 get_bounds(matrix, 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

TypeDescription
RectangleFThe estimated object’s bounds.

Method: transform(transform)

 transform(transform) 

Applies the specified transformation to the shape.

Parameters:

ParameterTypeDescription
transformMatrixThe transformation to apply.