CurveShape

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

public final class CurveShape extends PolygonShape

Represents a curved spline shape.

Constructors

ConstructorDescription
CurveShape()Initializes a new instance of the CurveShape class.
CurveShape(PointF[] points)Initializes a new instance of the CurveShape class.
CurveShape(PointF[] points, boolean isClosed)Initializes a new instance of the CurveShape class.
CurveShape(PointF[] points, float tension)Initializes a new instance of the CurveShape class.
CurveShape(PointF[] points, float tension, boolean isClosed)Initializes a new instance of the CurveShape class.

Methods

MethodDescription
getTension()Gets or sets the curve tension.
setTension(float value)Gets or sets the curve tension.
getBounds()Gets the object’s bounds.
getCenter()Gets the shape’s center.
getSegments()Gets the shape segments.
getBounds(Matrix matrix)Gets the object’s bounds.
getBounds(Matrix matrix, Pen pen)Gets the object’s bounds.
equals(Object o)Check if objects are equal.
hashCode()Get hash code of the current object.

CurveShape()

public CurveShape()

Initializes a new instance of the CurveShape class.

CurveShape(PointF[] points)

public CurveShape(PointF[] points)

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

Parameters:

ParameterTypeDescription
pointsPointF[]The points array.

CurveShape(PointF[] points, boolean isClosed)

public CurveShape(PointF[] points, boolean isClosed)

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

Parameters:

ParameterTypeDescription
pointsPointF[]The points array.
isClosedboolean

CurveShape(PointF[] points, float tension)

public CurveShape(PointF[] points, float tension)

Initializes a new instance of the CurveShape class.

Parameters:

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

CurveShape(PointF[] points, float tension, boolean isClosed)

public CurveShape(PointF[] points, float tension, boolean isClosed)

Initializes a new instance of the CurveShape class.

Parameters:

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

getTension()

public float getTension()

Gets or sets the curve tension.

Value: The curve tension.

Returns: float

setTension(float value)

public void setTension(float value)

Gets or sets the curve tension.

Value: The curve tension.

Parameters:

ParameterTypeDescription
valuefloat

getBounds()

public RectangleF getBounds()

Gets the object’s bounds.

Value: The object’s bounds.

Returns: RectangleF

getCenter()

public PointF getCenter()

Gets the shape’s center.

Value: The shape’s center.

Returns: PointF

getSegments()

public ShapeSegment[] getSegments()

Gets the shape segments.

Value: The shape segments.

Returns: com.aspose.imaging.ShapeSegment[]

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.

equals(Object o)

public boolean equals(Object o)

Check if objects are equal.

Parameters:

ParameterTypeDescription
ojava.lang.ObjectThe other object.

Returns: boolean - The equality comparison result.

hashCode()

public int hashCode()

Get hash code of the current object.

Returns: int - The hash code.