ShapeCollection

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.

נכסים

שםסוגגישהתיאור
ShapeCollectionShapeCollectionקראוקבל את הקולקציה של צורה.
TableTableקראומקבל את השולחן.

שיטות

חתימהתיאור
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.

ראה גם

 עברית