com.aspose.imaging.shapes
Class CurveShape

java.lang.Object
  extended by com.aspose.imaging.ObjectWithBounds
      extended by com.aspose.imaging.Shape
          extended by com.aspose.imaging.shapes.PolygonShape
              extended by com.aspose.imaging.shapes.CurveShape
All Implemented Interfaces:
IOrderedShape

public final class CurveShape
extends PolygonShape

Represents a curved spline shape.


Constructor Summary
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.
 
Method Summary
 RectangleF getBounds()
           Gets the object's bounds.
 RectangleF getBounds(Matrix matrix)
           Gets the object's bounds.
 RectangleF getBounds(Matrix matrix, Pen pen)
           Gets the object's bounds.
 PointF getCenter()
           Gets the shape's center.
 ShapeSegment[] getSegments()
           Gets the shape segments.
 float getTension()
           Gets the curve tension.
 void setTension(float value)
           Sets the curve tension.
 
Methods inherited from class com.aspose.imaging.shapes.PolygonShape
getEndPoint, getPoints, getStartPoint, hasSegments, isClosed, isClosed, reverse, setPoints, transform
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CurveShape

public CurveShape()

Initializes a new instance of the CurveShape class.


CurveShape

public CurveShape(PointF[] points)

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

Parameters:
points - The points array.

CurveShape

public CurveShape(PointF[] points,
                  boolean isClosed)

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

Parameters:
points - The points array.

CurveShape

public CurveShape(PointF[] points,
                  float tension)

Initializes a new instance of the CurveShape class.

Parameters:
points - The points array.
tension - The curve tension.

CurveShape

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

Initializes a new instance of the CurveShape class.

Parameters:
points - The points array.
tension - The curve tension.
isClosed - if set to true the curve is closed.
Method Detail

getBounds

public RectangleF getBounds()

Gets the object's bounds.

Value: The object's bounds.

Overrides:
getBounds in class PolygonShape

getBounds

public RectangleF getBounds(Matrix matrix)

Gets the object's bounds.

Overrides:
getBounds in class PolygonShape
Parameters:
matrix - The matrix to apply before bounds will be calculated.
Returns:
The estimated object's bounds.

getBounds

public RectangleF getBounds(Matrix matrix,
                            Pen pen)

Gets the object's bounds.

Overrides:
getBounds in class PolygonShape
Parameters:
matrix - The matrix to apply before bounds will be calculated.
pen - The pen to use for object. This can influence the object's bounds size.
Returns:
The estimated object's bounds.

getCenter

public PointF getCenter()

Gets the shape's center.

Value: The shape's center.

Overrides:
getCenter in class PolygonShape

getSegments

public ShapeSegment[] getSegments()

Gets the shape segments.

Value: The shape segments.

Overrides:
getSegments in class PolygonShape

getTension

public float getTension()

Gets the curve tension.

Value: The curve tension.


setTension

public void setTension(float value)

Sets the curve tension.

Value: The curve tension.