إنشاء عرض تقديمي - واجهة برمجة تطبيقات PowerPoint لـ C++

إنشاء عرض تقديمي لـ PowerPoint

لإضافة خط بسيط إلى شريحة محددة من العرض التقديمي، يرجى اتباع الخطوات أدناه:

  1. أنشئ مثيلاً من فئة Presentation.
  2. احصل على مرجع شريحة باستخدام فهرسها.
  3. أضف شكل تلقائي من نوع خط باستخدام طريقة AddAutoShape المعروضة بواسطة كائن Shapes.
  4. اكتب العرض التقديمي المعدل كملف PPTX.

في المثال الموضح أدناه، قمنا بإضافة خط إلى الشريحة الأولى من العرض التقديمي.

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);