public class Shapes
extends com.aspose.ms.System.Collections.CollectionBase
Represents a collection of Shape objects.
[C#] Pdf pdf1 = new Pdf(); Section sec1 = pdf1.Sections.Add(); Graph graph1 = new Graph(sec1,100,400); sec1.Paragraphs.Add(graph1); float[] posArr = new float[]{0,0,200,80,300,40,350,90}; Curve curve1 = new Curve(graph1,posArr); graph1.Shapes.Add(curve1); pdf1.Save(...); [Visual Basic] Dim pdf1 As Pdf = New Pdf() Dim sec1 As Section = pdf1.Sections.Add() Dim graph1 As Graph = New Graph(sec1, 100, 400) sec1.Paragraphs.Add(graph1) Dim posArr() As Single = New Single() {0, 0, 200, 80, 300, 40, 350, 90} Dim curve1 As Curve = New Curve(graph1, posArr) graph1.Shapes.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 and Description |
|---|
Shapes()
Initializes a new instance of the
Shapes class. |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Shape shape)
Adds a new
Shape object into the collection. |
void |
copyTo(Shape[] shapeArray,
int index)
Copies the elements to a
Shape object array, starting at a specified array index. |
Shape |
get_Item(int index)
Gets or sets a
Shape object from the collection according to Shape index. |
Shape |
get_Item(String shapeID)
Gets or sets a
Shape object from the collection according to Shape ID. |
int |
indexOf(Shape shape)
Gets the index of a specified
Shape object in the collection. |
void |
remove(Shape shapeToRemove)
Removes a
Shape object from the collection. |
void |
set_Item(int index,
Shape value) |
void |
set_Item(String shapeID,
Shape value) |
public void add(Shape shape)
Adds a new Shape object into the collection.
shape - The Shape object to be added.public void remove(Shape shapeToRemove)
Removes a Shape object from the collection.
shapeToRemove - The Shape object to be romoved.public void copyTo(Shape[] shapeArray, int index)
Copies the elements to a Shape object array, starting at a specified array index.
shapeArray - The shapes array.index - The start index.public int indexOf(Shape shape)
Gets the index of a specified Shape object in the collection.
shape - The specified Shape object.public Shape get_Item(int index)
Gets or sets a Shape object from the collection according to Shape index.
get_Item in interface com.aspose.ms.System.Collections.IListget_Item in class com.aspose.ms.System.Collections.CollectionBasepublic void set_Item(int index,
Shape value)
public Shape get_Item(String shapeID)
Gets or sets a Shape object from the collection according to Shape ID.
Copyright © 2016 Aspose. All Rights Reserved.