ShapeCollection

ShapeCollection

概要

ShapeCollection は Aspose.Slides の C++ 用 FOSS におけるクラスです。

スライド上のシェイプのコレクションを管理します。2つのモードで動作します: - シンプルモード (デフォルト): シェイプはメモリ内のみで管理されます。 - XML バックエンドモード (init_internal の後): シェイプはスライドの spTree XML から読み込まれ、永続化されます。遅延キャッシュが使用されます。

このクラスは C++ プログラムで ShapeCollection オブジェクトを操作するための 49 のメソッドを提供します。利用可能なメソッドは ShapeCollection, Table, add_auto_shape, add_auto_shape_impl, add_connector, add_connector_impl, add_picture_frame, add_picture_frame_impl, add_table, add_table_impl, as_i_collection, as_i_enumerable と、さらに 25 のメソッドです。Aspose.Slides の C++ 用 FOSS パッケージをインストールすれば、すべてのパブリックメンバーは任意の C++ アプリケーションから利用可能です。プロパティ: ShapeCollection, Table。

プロパティ

名前型アクセス説明
ShapeCollectionShapeCollection読み取りシェイプコレクションを取得します。
TableTable読み取りテーブルを取得します。

メソッド

シグネチャ説明
ShapeCollection() → ShapeCollectionプロパティはコレクション自体へのアクセスを提供します
Table() → Tableプロパティはコレクションに関連付けられた Table shape へのアクセスを提供します
Table() → Table
ShapeCollection()
ShapeCollection()
init_internal(slide_part: Internal::pptx::SlidePart, parent_slide: IBaseSlide)スライド パーツから初期化し、XML バックエンドモードに入ります。
parent_group() → IGroupShape親グループシェイプを返します。トップレベルの場合は nullptr を返します。
as_i_collection() → IShapeCollectionこのコレクションを汎用コレクションインターフェイスとして返します。
as_i_enumerable() → IShapeCollectionこのコレクションを汎用列挙インターフェイスとして返します。
size() → std::size_t形状の数を返します。
to_array() → std::vector<Shape*>非所有ポインタとしてすべての形状を返します。
to_array(start_index: std::size_t, count: std::size_t) → std::vector<Shape*>非所有ポインタとしてすべての形状を返します。
reorder(new_index: std::size_t, shape: Shape)形状を指定された位置(z-order)に移動します。
reorder(index: std::size_t, shapes: std::span<Shape*>)シェイプを指定された位置(z-order)に移動します。
add_auto_shape(type: ShapeType, x: double, y: double, width: double, height: double) → AutoShapeコレクションに AutoShape を追加します。
add_auto_shape(type: ShapeType, x: double, y: double, width: double, height: double, create_from_template: bool) → AutoShapeコレクションに AutoShape を追加します。
insert_auto_shape(index: std::size_t, type: ShapeType, x: double, y: double, width: double, height: double) → AutoShape指定されたインデックスに AutoShape を挿入します。
insert_auto_shape(index: std::size_t, type: ShapeType, x: double, y: double, width: double, height: double, create_from_template: bool) → AutoShape指定されたインデックスにAutoShapeを挿入します。
add_connector(type: ShapeType, x: double, y: double, width: double, height: double) → ConnectorコレクションにConnectorを追加します。
add_connector(type: ShapeType, x: double, y: double, width: double, height: double, create_from_template: bool) → ConnectorコレクションにConnectorを追加します。
insert_connector(index: std::size_t, type: ShapeType, x: double, y: double, width: double, height: double) → Connector指定されたインデックスにConnectorを挿入します。
insert_connector(index: std::size_t, type: ShapeType, x: double, y: double, width: double, height: double, create_from_template: bool) → Connector指定されたインデックスにConnectorを挿入します。
index_of(shape: Shape) → std::ptrdiff_t形状のゼロベースインデックスを返します。見つからない場合は -1 を返します。
add_picture_frame(type: ShapeType, x: double, y: double, width: double, height: double, image: PPImage) → PictureFrameコレクションに PictureFrame を追加します。
insert_picture_frame(index: std::size_t, type: ShapeType, x: double, y: double, width: double, height: double, image: PPImage) → PictureFrame指定されたインデックスに PictureFrame を挿入します。
add_table(x: double, y: double, column_widths: std::span<const double>, row_heights: std::span<const double>) → Tableコレクションに Table を追加します。
insert_table(index: std::size_t, x: double, y: double, column_widths: std::span<const double>, row_heights: std::span<const double>) → Table指定されたインデックスにテーブルを挿入します。
remove(shape: Shape)参照によってコレクションから shape を削除します。
remove_at(index: std::size_t)指定されたインデックスの shape を削除します。
clear()すべての shape を削除します。
table_count() → std::size_tコレクション内のテーブル数を返します。
table_at(index: std::size_t) → Table指定されたインデックスのテーブルを返します。
table_at(index: std::size_t) → Table指定されたインデックスのテーブルを返します。
begin() → iterator最初のシェイプへのイテレータを返します
end() → iterator最後のシェイプの後のイテレータを返します
begin() → const_iterator
end() → const_iterator
get_sp_tree() → pugi::xml_nodeスライド XML から spTree 要素を取得します。
load_shapes()内部キャッシュを埋めるために、XML からすべてのシェイプをロードします。キャッシュがすでに有効な場合は何もしません。
invalidate_cache()shapes cache を無効化し、次回アクセス時にリロードを強制します。
save_to_part()slide part に対する変更を保存します。
next_shape_id() → intspTree で次に利用可能なシェイプ ID を検索します。
build_auto_shape_xml(sp: pugi::xml_node, shape_id: int, name: std::string_view, type: ShapeType, x: double, y: double, w: double, h: double, create_from_template: bool)AutoShape 要素用の新しい XML コンテンツを構築します。
build_connector_xml(cxn_sp: pugi::xml_node, shape_id: int, name: std::string_view, type: ShapeType, x: double, y: double, w: double, h: double, create_from_template: bool)新しいコネクタ (cxnSp) 要素の XML コンテンツを構築する。
add_auto_shape_impl(index: std::optional<std::size_t>, type: ShapeType, x: double, y: double, w: double, h: double, create_from_template: bool) → AutoShapeadd_auto_shape と insert_auto_shape のコア実装。
add_connector_impl(index: std::optional<std::size_t>, type: ShapeType, x: double, y: double, w: double, h: double, create_from_template: bool) → Connectoradd_connector と insert_connector のコア実装。
add_picture_frame_impl(index: std::optional<std::size_t>, type: ShapeType, x: double, y: double, w: double, h: double, image: PPImage) → PictureFrameadd_picture_frame と insert_picture_frame のコア実装。
add_table_impl(index: std::optional<std::size_t>, x: double, y: double, column_widths: std::span<const double>, row_heights: std::span<const double>) → Tableadd_table と insert_table のコア実装。
reorder_single(new_index: std::size_t, shape: Shape)単一のシェイプをXML内の新しい位置に並べ替えてキャッシュする。

参照

 日本語