aspose.pdf
Class ComplexShape

java.lang.Object
  extended by aspose.pdf.Shape
      extended by aspose.pdf.ClosedShape
          extended by aspose.pdf.ComplexShape

public class ComplexShape
extends ClosedShape

ComplexShape is a Shape that consists of several closed Shapes (contours). It can contain Circle, Ellipse, Rectangle and Path. Other shapes are ignored.

Typical usages are the following:

[Java] Pdf pdf1 = new Pdf(); Section sec = pdf.getSections().add(); Color color = new aspose.pdf.Color("Red"); Graph graph = new Graph(100,400); sec.getParagraphs().add(graph); ComplexShape complexShape = new ComplexShape(graph); path.getGraphInfo().setFillColor(color); path.getGraphInfo().setIsFilled(true); path.getGraphInfo().setFillRule("evenodd"); graph.getShapes().add(path); Path path = new Path(); complexShape.getShapes().add(path); Line line = new Line(new float [] {200, 80, 200, 100}); path.getShapes().add(line); Arc arc = new Arc(200, 50, 50, 90, 270); path.getShapes().add(arc); float [] curPos = arc.getEndPosition(); line = new Line(new float [] {curPos[0], curPos[1], 200, 20}); path.getShapes().add(line); arc = new Arc(200, 50, 30, 270, 90); path.getShapes().add(arc); Circle circle = new Circle(160, 50, 5); complexShape.getShapes().add(circle); pdf1.save(....);


Constructor Summary
ComplexShape()
          Initializes a new instance of the ComplexShape class.
ComplexShape(Graph graph)
          Initializes a new instance of the ComplexShape class.
 
Method Summary
 java.util.List<ClosedShape> getShapes()
          Returns a list of closed shapes.
 void setShapes(java.util.List<ClosedShape> shapes)
          Set a list of closed shapes.
 
Methods inherited from class aspose.pdf.Shape
getGraphInfo, getID, setGraphInfo, setID
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComplexShape

public ComplexShape()
Initializes a new instance of the ComplexShape class.


ComplexShape

public ComplexShape(Graph graph)
Initializes a new instance of the ComplexShape class.

Parameters:
graph - The specified Graph object.

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

Method Detail

getShapes

public java.util.List<ClosedShape> getShapes()
Returns a list of closed shapes.


setShapes

public void setShapes(java.util.List<ClosedShape> shapes)
Set a list of closed shapes.

Parameters:
shapes -