إنشاء عرض تقديمي - واجهة برمجة تطبيقات PowerPoint لـ C++
Contents
[
Hide
]
إنشاء عرض تقديمي لـ PowerPoint
لإضافة خط بسيط إلى شريحة محددة من العرض التقديمي، يرجى اتباع الخطوات أدناه:
- أنشئ مثيلاً من فئة Presentation.
- احصل على مرجع شريحة باستخدام فهرسها.
- أضف شكل تلقائي من نوع خط باستخدام طريقة AddAutoShape المعروضة بواسطة كائن Shapes.
- اكتب العرض التقديمي المعدل كملف PPTX.
في المثال الموضح أدناه، قمنا بإضافة خط إلى الشريحة الأولى من العرض التقديمي.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For complete examples and data files, please go to https://github.com/aspose-slides/Aspose.Slides-for-C | |
// The path to the documents directory. | |
const String outPath = u"../out/SampleChartresult.pptx"; | |
//Instantiate Presentation class that represents PPTX file | |
SharedPtr<Presentation> pres = MakeObject<Presentation>(); | |
SharedPtr<ISlide> slide = pres->get_Slides()->idx_get(0); | |
// Add an autoshape of type line | |
slide->get_Shapes()->AddAutoShape(Aspose::Slides::ShapeType::Line, 50.0, 150.0, 300.0, 0.0); | |
//Saving presentation | |
pres->Save(outPath, Aspose::Slides::Export::SaveFormat::Pptx); | |