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
Constructor | Description |
---|---|
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
Method | Description |
---|---|
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:
Parameter | Type | Description |
---|---|---|
points | PointF[] | 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:
Parameter | Type | Description |
---|---|---|
points | PointF[] | The points array. |
isClosed | boolean |
CurveShape(PointF[] points, float tension)
public CurveShape(PointF[] points, float tension)
Initializes a new instance of the CurveShape
class.
Parameters:
Parameter | Type | Description |
---|---|---|
points | PointF[] | The points array. |
tension | float | The 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:
Parameter | Type | Description |
---|---|---|
points | PointF[] | The points array. |
tension | float | The curve tension. |
isClosed | boolean | if 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:
Parameter | Type | Description |
---|---|---|
value | float |
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:
Parameter | Type | Description |
---|---|---|
matrix | Matrix | The 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:
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: RectangleF - The estimated object’s bounds.
equals(Object o)
public boolean equals(Object o)
Check if objects are equal.
Parameters:
Parameter | Type | Description |
---|---|---|
o | java.lang.Object | The other object. |
Returns: boolean - The equality comparison result.
hashCode()
public int hashCode()
Get hash code of the current object.
Returns: int - The hash code.