ShapeCollection
סקירה כללית
ShapeCollection הוא שיעור ב Aspose.Slides FOSS עבור C++.
ניהול אוסף של צורות על סליד.פעיל בשני מצבים: - אופנה פשוטה (בדיוק): צורות מנוהלות רק בזיכרון. - מצב תמיכה XML (לאחר init_internal): צורות הועלו וממשיכו ל- spTree XML של הסליד, עם קציר נוח.
שיעור זה מספק 49 שיטות לעבוד עם אובייקטים ShapeCollection בתוכניות C++. שיטות זמינות כוללות: 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 שיטות נוספות. כל החברים הציבוריים זמינים לכל יישום C++ לאחר התקנת Aspose.Slides FOSS עבור חבילת C+. רכוש : ShapeCollection, Table.
נכסים
| שם | סוג | גישה | תיאור |
|---|---|---|---|
ShapeCollection | ShapeCollection | קראו | קבל את הקולקציה של צורה. |
Table | Table | קראו | מקבל את השולחן. |
שיטות
| חתימה | תיאור |
|---|---|
ShapeCollection() → ShapeCollection | הנכס נותן גישה לאוסף עצמו |
Table() → Table | הנכס מספק גישה לצורת השולחן הקשורה לאוסף |
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-Ord). |
reorder(index: std::size_t, shapes: std::span<Shape*>) | העברת צורה לתוך המיקום המוגדר (Z-Ord). |
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 | הוסף מחבר לאוסף. |
add_connector(type: ShapeType, x: double, y: double, width: double, height: double, create_from_template: bool) → Connector | הוסף מחבר לאוסף. |
insert_connector(index: std::size_t, type: ShapeType, x: double, y: double, width: double, height: double) → 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 | החזיר את האינדקס המבוסס על אפס של צורה, או -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 | הוסף שולחן לאוסף. |
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 | קבל את החלק spTree מהסליד XML. |
load_shapes() | הורד את כל הצורות מ-XML, הפופולרי של המאגר הפנימי.No-op אם המגיר כבר בתוקף. |
invalidate_cache() | להכחיש את צורות הקאצ’ה, כפוף מחדש על הגישה הבאה. |
save_to_part() | שמור את השינויים לחלק ה-slide. |
next_shape_id() → int | מצא את ה-File ID הבא זמין ב 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) | בניית תוכן XML עבור אלמנט חדש 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) | בניית תוכן XML עבור אלמנט חדש של מחבר (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 | יישום הליבה עבור add_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) → Connector | יישום הליבה עבור add_connector ו- 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 | יישום מרכזי עבור add_picture_frame ו- 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 | יישום הליבה עבור add_table ו- insert_tab. |
reorder_single(new_index: std::size_t, shape: Shape) | העברת צורה אחת לתוך מיקום חדש ב- XML ו- cache. |