ShapeCollection

ShapeCollection

개요

ShapeCollection은(는) Aspose.Slides FOSS for C++의 클래스입니다.

슬라이드의 도형 컬렉션을 관리합니다. 두 가지 모드로 작동합니다: - 단순 모드 (기본값): 도형은 메모리 내에서만 관리됩니다. - XML-backed mode (after 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 FOSS for C++ 패키지를 설치한 후에는 모든 공개 멤버에 C++ 애플리케이션에서 접근할 수 있습니다. 속성: ShapeCollection, Table.

속성

이름유형액세스설명
ShapeCollectionShapeCollection읽기모양 컬렉션을 가져옵니다.
TableTable읽기테이블을 가져옵니다.

메서드

시그니처설명
ShapeCollection() → ShapeCollectionProperty는 컬렉션 자체에 대한 액세스를 제공합니다.
Table() → TableProperty는 컬렉션과 연관된 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-순서)로 도형을 이동합니다.
reorder(index: std::size_t, shapes: std::span<Shape*>)지정된 위치(z-순서)로 도형을 이동합니다.
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지정된 인덱스에 커넥터를 삽입합니다.
index_of(shape: Shape) → std::ptrdiff_t형상의 0부터 시작하는 인덱스를 반환하며, 찾을 수 없으면 -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)컬렉션에서 도형을 참조로 제거합니다.
remove_at(index: std::size_t)주어진 인덱스에 있는 도형을 제거합니다.
clear()모든 도형을 제거합니다.
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()도형 캐시를 무효화하고, 다음 접근 시 다시 로드하도록 강제합니다.
save_to_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>) → Table핵심 구현: add_table 및 insert_table.
reorder_single(new_index: std::size_t, shape: Shape)단일 모양을 XML의 새 위치로 재정렬하고 캐시합니다.

참조

 한국어