Aspose::Cells::Drawing::ShapeCollection::Get method
Contents
[
Hide
]ShapeCollection::Get(int32_t) method
Gets the Shape object at the specific index in the list.
Shape Aspose::Cells::Drawing::ShapeCollection::Get(int32_t index)
Parameter | Type | Description |
---|---|---|
index | int32_t | The index. |
ReturnValue
Examples
//get the first shape
Shape shape = shapes.Get(0);
See Also
- Class Shape
- Class Vector
- Class ShapeCollection
- Namespace Aspose::Cells::Drawing
- Library Aspose.Cells for C++
ShapeCollection::Get(const U16String&) method
Gets the Shape object by the name of the shape.
Shape Aspose::Cells::Drawing::ShapeCollection::Get(const U16String &name)
Parameter | Type | Description |
---|---|---|
name | const U16String& | The name of the shape. |
ReturnValue
Examples
//add a shape
shapes.AddRectangle(2, 0, 2, 0, 130, 130);
//get the shape by the name.
U16String val = u"Rectangle 1";
Shape shape1 = shapes.Get(val);
if (!shape1.IsNull())
{
//Got the shape named 'Rectangle 1'.
}
See Also
- Class Shape
- Class Vector
- Class U16String
- Class ShapeCollection
- Namespace Aspose::Cells::Drawing
- Library Aspose.Cells for C++
ShapeCollection::Get(const char16_t*) method
Gets the Shape object by the name of the shape.
Shape Aspose::Cells::Drawing::ShapeCollection::Get(const char16_t *name)
Parameter | Type | Description |
---|---|---|
name | const char16_t* | The name of the shape. |
ReturnValue
Examples
//add a shape
shapes.AddRectangle(2, 0, 2, 0, 130, 130);
//get the shape
Shape shape1 = shapes.Get(u"Rectangle 1");
if (!shape1.IsNull())
{
//Got the shape named 'Rectangle 1'.
}
See Also
- Class Shape
- Class Vector
- Class ShapeCollection
- Namespace Aspose::Cells::Drawing
- Library Aspose.Cells for C++