aspose.pdf
Class Curve

java.lang.Object
  extended by aspose.pdf.Shape
      extended by aspose.pdf.UnclosedShape
          extended by aspose.pdf.Curve

public class Curve
extends UnclosedShape

Represents a curve Shape in a Graph.

Typical usages are the following:

[Java] Pdf pdf1 = new Pdf(); Section sec1 = pdf1.getSections().add(); Graph graph1 = new Graph(sec1,100,400); sec1.getParagraphs().add(graph1); float[] posArr = new float[]{0,0,200,80,300,40,350,90}; Curve curve1 = new Curve(graph1,posArr); graph1.getShapes().add(curve1); pdf1.save(...); [XML] <?xml version="1.0" encoding="utf-8" ?> <Pdf xmlns="Aspose.Pdf"> <Section> <Graph Height="100" Width="400"> <Curve Position="0 0 200 80 300 40 350 90" /> </Graph> </Section> </Pdf>


Constructor Summary
Curve()
          Constructor - initializes a new instance of the Curve class.
Curve(float[] positionArr)
          Constructor - initializes a new instance of the Curve class.
Curve(Graph graph)
          Constructor - initializes a new instance of the Curve class.
Curve(Graph graph, float[] positionArr)
          Constructor - initializes a new instance of the Curve class.
 
Method Summary
protected  java.lang.Object clone()
           
 float[] getEndPosition()
          Return the last point of unclosed shape.
 float getPosition1X()
          Gets a float value that indicates the x-coordinate of the control point 1 of the curve.
 float getPosition1Y()
          Gets or a float value that indicates the y-coordinate of the control point 1 of the curve.
 float getPosition2X()
          Gets a float value that indicates the x-coordinate of the control point 2 of the curve.
 float getPosition2Y()
          Gets a float value that indicates the y-coordinate of the control point 2 of the curve.
 float getPosition3X()
          Gets a float value that indicates the x-coordinate of the control point 3 of the curve.
 float getPosition3Y()
          Gets a float value that indicates the y-coordinate of the control point 3 of the curve.
 float getPosition4X()
          Gets a float value that indicates the x-coordinate of the control point 4 of the curve.
 float getPosition4Y()
          Gets a float value that indicates the y-coordinate of the control point 4 of the curve.
 float[] getStartPosition()
          Return the first point of unclosed shape.
 void setPosition1X(float value)
          Sets a float value that indicates the x-coordinate of the control point 1 of the curve.
 void setPosition1Y(float value)
          Sets or a float value that indicates the y-coordinate of the control point 1 of the curve.
 void setPosition2X(float value)
          Sets a float value that indicates the x-coordinate of the control point 2 of the curve.
 void setPosition2Y(float value)
          Sets a float value that indicates the y-coordinate of the control point 2 of the curve.
 void setPosition3X(float value)
          Sets a float value that indicates the x-coordinate of the control point 3 of the curve.
 void setPosition3Y(float value)
          Sets a float value that indicates the y-coordinate of the control point 3 of the curve.
 void setPosition4X(float value)
          Sets a float value that indicates the x-coordinate of the control point 4 of the curve.
 void setPosition4Y(float value)
          Sets a float value that indicates the y-coordinate of the control point 4 of the curve.
 
Methods inherited from class aspose.pdf.Shape
getGraphInfo, getID, setGraphInfo, setID
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Curve

public Curve()
Constructor - initializes a new instance of the Curve class.


Curve

public Curve(float[] positionArr)
Constructor - initializes a new instance of the Curve class.

Parameters:
positionArr - The position array of the control points of the curve. There should be four control points,so the length of the array should be eight.

Curve

public Curve(Graph graph)
Constructor - initializes a new instance of the Curve class.

Remarks: This constructor can inherit common property values from the specified Graph object.

Parameters:
graph - The graph object.

Curve

public Curve(Graph graph,
             float[] positionArr)
Constructor - initializes a new instance of the Curve class.

Remarks:There should be four control points, so the length of the array should be eight. This constructor can inherit common property values from the specified object.

Parameters:
graph - The Graph object.
positionArr - The position array of the control points of the curve.
Method Detail

getPosition1X

public float getPosition1X()
Gets a float value that indicates the x-coordinate of the control point 1 of the curve.

Returns:
A float value.

setPosition1X

public void setPosition1X(float value)
Sets a float value that indicates the x-coordinate of the control point 1 of the curve.

Parameters:
value - A float value.

getPosition1Y

public float getPosition1Y()
Gets or a float value that indicates the y-coordinate of the control point 1 of the curve.

Returns:
A float value.

setPosition1Y

public void setPosition1Y(float value)
Sets or a float value that indicates the y-coordinate of the control point 1 of the curve.

Parameters:
value - A float value.

getPosition2X

public float getPosition2X()
Gets a float value that indicates the x-coordinate of the control point 2 of the curve.

Returns:
A float value.

setPosition2X

public void setPosition2X(float value)
Sets a float value that indicates the x-coordinate of the control point 2 of the curve.

Parameters:
value - A float value.

getPosition2Y

public float getPosition2Y()
Gets a float value that indicates the y-coordinate of the control point 2 of the curve.

Returns:
A float value.

setPosition2Y

public void setPosition2Y(float value)
Sets a float value that indicates the y-coordinate of the control point 2 of the curve.

Parameters:
value - A float value.

getPosition3X

public float getPosition3X()
Gets a float value that indicates the x-coordinate of the control point 3 of the curve.

Returns:
A float value.

setPosition3X

public void setPosition3X(float value)
Sets a float value that indicates the x-coordinate of the control point 3 of the curve.

Parameters:
value - A float value.

getPosition3Y

public float getPosition3Y()
Gets a float value that indicates the y-coordinate of the control point 3 of the curve.

Returns:
A float value.

setPosition3Y

public void setPosition3Y(float value)
Sets a float value that indicates the y-coordinate of the control point 3 of the curve.

Parameters:
value - A float value.

getPosition4X

public float getPosition4X()
Gets a float value that indicates the x-coordinate of the control point 4 of the curve.

Returns:
A float value.

setPosition4X

public void setPosition4X(float value)
Sets a float value that indicates the x-coordinate of the control point 4 of the curve.

Parameters:
value - A float value.

getPosition4Y

public float getPosition4Y()
Gets a float value that indicates the y-coordinate of the control point 4 of the curve.

Returns:
A float value.

setPosition4Y

public void setPosition4Y(float value)
Sets a float value that indicates the y-coordinate of the control point 4 of the curve.

Parameters:
value - A float value.

clone

protected java.lang.Object clone()
Overrides:
clone in class java.lang.Object

getStartPosition

public float[] getStartPosition()
Description copied from class: UnclosedShape
Return the first point of unclosed shape.

Specified by:
getStartPosition in class UnclosedShape

getEndPosition

public float[] getEndPosition()
Description copied from class: UnclosedShape
Return the last point of unclosed shape.

Specified by:
getEndPosition in class UnclosedShape