ShapeCollection

ShapeCollection

Overview

ShapeCollection là một lớp trong Aspose.Slides FOSS cho C++.

Quản lý bộ sưu tập các hình dạng trên một tấm. hoạt động trong hai chế độ: - Phương pháp đơn giản (Thuyết minh): Các hình thức chỉ được quản lý trong bộ nhớ. - Xml-backed Mode - chế độ hỗ trợ (sau init_internal): các hình dạng được tải xuống và tiếp tục vào spTree XML của slide, với caching lười biếng.

Khóa học này cung cấp 49 phương pháp để làm việc với các đối tượng ShapeCollection trong các chương trình C++. Các phương pháp có sẵn bao gồm: 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,Và 25 phương pháp bổ sung. Tất cả các thành viên công cộng đều có thể truy cập vào bất kỳ ứng dụng C++ nào sau khi cài đặt Aspose.Slides FOSS cho gói C ++. Tài sản : ShapeCollection, Table.

Properties

NameTypeAccessDescription
ShapeCollectionShapeCollectionReadNhận được bộ sưu tập hình dạng.
TableTableReadGọi bàn.

Methods

SignatureDescription
ShapeCollection()ShapeCollectionTài sản cho phép truy cập vào bản thân bộ sưu tập
Table()TableBất động sản cung cấp quyền truy cập vào hình thức bảng liên quan đến bộ sưu tập
Table()Table
ShapeCollection()
ShapeCollection()
init_internal(slide_part: Internal::pptx::SlidePart, parent_slide: IBaseSlide)Bắt đầu từ một phần nhấp chuột, nhập chế độ hỗ trợ XML.
parent_group()IGroupShapeTrở lại hình dạng nhóm mẹ, hoặc nullptr nếu cấp độ cao.
as_i_collection()IShapeCollectionTrả lại bộ sưu tập này như một giao diện thu thập phổ biến.
as_i_enumerable()IShapeCollectionTrả lại bộ sưu tập này như một giao diện tổng hợp chung.
size()std::size_tTrở lại số hình dạng.
to_array()std::vector<Shape*>Trở về tất cả các hình dạng như không sở hữu điểm.
to_array(start_index: std::size_t, count: std::size_t)std::vector<Shape*>Trở về tất cả các hình dạng như không sở hữu điểm.
reorder(new_index: std::size_t, shape: Shape)Chuyển hình sang vị trí cụ thể (z-order).
reorder(index: std::size_t, shapes: std::span<Shape*>)Chuyển hình sang vị trí cụ thể (z-order).
add_auto_shape(type: ShapeType, x: double, y: double, width: double, height: double)AutoShapeThêm một AutoShape vào bộ sưu tập.
add_auto_shape(type: ShapeType, x: double, y: double, width: double, height: double, create_from_template: bool)AutoShapeThêm một AutoShape vào bộ sưu tập.
insert_auto_shape(index: std::size_t, type: ShapeType, x: double, y: double, width: double, height: double)AutoShapeNhập AutoShape vào chỉ số cụ thể.
insert_auto_shape(index: std::size_t, type: ShapeType, x: double, y: double, width: double, height: double, create_from_template: bool)AutoShapeNhập AutoShape vào chỉ số cụ thể.
add_connector(type: ShapeType, x: double, y: double, width: double, height: double)ConnectorThêm một bộ kết nối vào bộ sưu tập.
add_connector(type: ShapeType, x: double, y: double, width: double, height: double, create_from_template: bool)ConnectorThêm một bộ kết nối vào bộ sưu tập.
insert_connector(index: std::size_t, type: ShapeType, x: double, y: double, width: double, height: double)ConnectorNhập một con nối vào chỉ số cụ thể.
insert_connector(index: std::size_t, type: ShapeType, x: double, y: double, width: double, height: double, create_from_template: bool)ConnectorNhập một con nối vào chỉ số cụ thể.
index_of(shape: Shape)std::ptrdiff_tTrả lại chỉ số dựa trên không của một hình dạng, hoặc -1 nếu không tìm thấy.
add_picture_frame(type: ShapeType, x: double, y: double, width: double, height: double, image: PPImage)PictureFrameThêm một PictureFrame vào bộ sưu tập.
insert_picture_frame(index: std::size_t, type: ShapeType, x: double, y: double, width: double, height: double, image: PPImage)PictureFrameNhập PictureFrame vào chỉ số cụ thể.
add_table(x: double, y: double, column_widths: std::span<const double>, row_heights: std::span<const double>)TableThêm một bảng vào bộ sưu tập.
insert_table(index: std::size_t, x: double, y: double, column_widths: std::span<const double>, row_heights: std::span<const double>)TableNhập một bảng trong chỉ số cụ thể.
remove(shape: Shape)Xóa một hình dạng từ bộ sưu tập bằng cách tham chiếu.
remove_at(index: std::size_t)Xóa hình dạng trên chỉ số đó.
clear()Xóa tất cả các hình dạng.
table_count()std::size_tTrả lại số lượng bảng trong bộ sưu tập.
table_at(index: std::size_t)TableTrả lại bảng ở chỉ số đã được cung cấp.
table_at(index: std::size_t)TableTrả lại bảng ở chỉ số đã được cung cấp.
begin()iteratorTrở lại một iterator vào hình dạng đầu tiên
end()iteratorTrở lại một iterator qua hình dạng cuối cùng
begin()const_iterator
end()const_iterator
get_sp_tree()pugi::xml_nodeNhận các yếu tố spTree từ slide XML.
load_shapes()Tải tất cả các hình thức từ XML, dân số hóa cache nội bộ. No-op nếu caching đã có hiệu lực.
invalidate_cache()Tắt các hình thức cache, buộc một tải về trên truy cập tiếp theo.
save_to_part()Lưu các thay đổi vào phần slide.
next_shape_id()intTìm ID hình dạng tiếp theo có sẵn trong spTree.
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)Xây dựng nội dung XML cho một yếu tố mới AutoShape.
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)Xây dựng nội dung XML cho một yếu tố nối mới (cxnSp).
add_auto_shape_impl(index: std::optional<std::size_t>, type: ShapeType, x: double, y: double, w: double, h: double, create_from_template: bool)AutoShape- Thực hiện cốt lõi cho add_auto_shape và 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)Connector- Chế độ thực hiện cho add_connector và insert_Connect.
add_picture_frame_impl(index: std::optional<std::size_t>, type: ShapeType, x: double, y: double, w: double, h: double, image: PPImage)PictureFrame- Chế độ thực hiện cho add_picture_frame và insert_icture-fram.
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- Chế độ thực hiện cho add_table và insert_tab.
reorder_single(new_index: std::size_t, shape: Shape)Tái định dạng một hình thức thành vị trí mới trong XML và cache.

See Also

 Tiếng Việt