ShapeCollection

ShapeCollection

Przegląd

ShapeCollection jest klasą w Aspose.Slides FOSS dla .NET. Dziedziczy po: IShapeCollection.

Reprezentuje uporządkowaną, zmienną kolekcję obiektów IShape należących do slajdu lub grupy kształtów.

Ta klasa udostępnia 22 metody do pracy z obiektami ShapeCollection w programach .NET. Dostępne metody to: AddAutoShape, AddConnector, AddPictureFrame, AddTable, Clear, GetEnumerator, IndexOf, InsertAutoShape, InsertConnector, InsertPictureFrame, InsertTable, Remove oraz 4 dodatkowe metody. Wszystkie publiczne elementy są dostępne dla każdej aplikacji .NET po zainstalowaniu pakietu Aspose.Slides FOSS dla .NET. Właściwości: AsICollection, AsIEnumerable, Count, ParentGroup.

Właściwości

NazwaTypDostępOpis
ParentGroupIGroupShape?OdczytPobiera grupę nadrzędną.
AsICollectionIList<IShape>OdczytPobiera kolekcję as i.
AsIEnumerableIEnumerable<IShape>OdczytZwraca jako IEnumerable.
CountintOdczytPobiera liczbę.

Metody

SygnaturaOpis
ShapeCollection()Inicjalizuje nową instancję klasy ShapeCollection.
ToArray()Zwraca pod‑tablicę kształtów zaczynającą się od startIndex
ToArray(startIndex: int, count: int)Wywołuje ToArray(startIndex, count) na tej instancji ShapeCollection.
Reorder(index: int, shape: IShape)Przesuwa wiele kształtów, aby zaczynały się od podanego indeksu
Reorder(index: int, shapes: IShape[])Wywołuje Reorder(index, shapes) na tej instancji ShapeCollection.
AddAutoShape(shapeType: ShapeType, x: float, y: float, width: float, height: float)Tworzy nowy AutoShape żądanego ShapeType w określonych współrzędnych i zwraca instancję kształtu
AddAutoShape(shapeType: ShapeType, x: float, y: float, width: float, height: float, createFromTemplate: bool)Wywołuje AddAutoShape(shapeType, x, y, width, height, createFromTemplate) na tej instancji ShapeCollection.
InsertAutoShape(index: int, shapeType: ShapeType, x: float, y: float, width: float, height: float)Wstawia nowy AutoShape pod indeksem, opcjonalnie z szablonu
InsertAutoShape(index: int, shapeType: ShapeType, x: float, y: float, width: float, height: float, createFromTemplate: bool)Wywołuje InsertAutoShape(index, shapeType, x, y, width, height, createFromTemplate) na tej instancji ShapeCollection.
AddConnector(shapeType: ShapeType, x: float, y: float, width: float, height: float)Dodaje łącznik, opcjonalnie z szablonu
AddConnector(shapeType: ShapeType, x: float, y: float, width: float, height: float, createFromTemplate: bool)Wywołuje AddConnector(shapeType, x, y, width, height, createFromTemplate) na tej instancji ShapeCollection.
InsertConnector(index: int, shapeType: ShapeType, x: float, y: float, width: float, height: float)Wstawia łącznik w podanym indeksie
InsertConnector(index: int, shapeType: ShapeType, x: float, y: float, width: float, height: float, createFromTemplate: bool)Wywołuje InsertConnector(index, shapeType, x, y, width, height, createFromTemplate) na tej instancji ShapeCollection.
AddPictureFrame(shapeType: ShapeType, x: float, y: float, width: float, height: float, image: IPPImage)Dodaje ramkę obrazu z podanym obrazem
InsertPictureFrame(index: int, shapeType: ShapeType, x: float, y: float, width: float, height: float, image: IPPImage)Wstawia ramkę obrazu pod indeksem z podanym obrazem
AddTable(x: float, y: float, columnWidths: double[], rowHeights: double[])Dodaje tabelę w pozycji z określonymi szerokościami kolumn i wysokościami wierszy
InsertTable(index: int, x: float, y: float, columnWidths: double[], rowHeights: double[])Wstawia tabelę pod indeksem o podanych wymiarach
IndexOf(shape: IShape)Zwraca indeks zerowy określonego kształtu
RemoveAt(index: int)Usuwa kształt pod danym indeksem
Remove(shape: IShape)Usuwa określony kształt z kolekcji
Clear()Wywołuje metodę Clear na tej instancji ShapeCollection.
GetEnumerator()Zwraca enumerator umożliwiający iterację kształtów

Zobacz także

 Polski