Wie man anfängt
Dieser Abschnitt behandelt alles, was Sie brauchen, um Aspose.Slides FOSS für C ++ einzurichten und Ihre erste Präsentation zu schreiben.
In diesem Abschnitt
| Page | Description |
|---|---|
| Installation | Build from source with CMake FetchContent or git submodule, verify the build, and run a quick start program. |
| License | MIT License details: free for any use, no API key, no registration required. |
Schnelle Errichtung
include(FetchContent)
FetchContent_Declare(
aspose_slides_foss
GIT_REPOSITORY https://github.com/aspose-slides-foss/Aspose.Slides-FOSS-for-Cpp.git
GIT_TAG main
)
FetchContent_MakeAvailable(aspose_slides_foss)Erfordert einen C++20-Compiler und CMake 3.20 oder höher.
Mindestvorgangsgegenstand
#include <Aspose/Slides/Foss/presentation.h>
#include <Aspose/Slides/Foss/export/save_format.h>
#include <Aspose/Slides/Foss/shape_type.h>
#include <Aspose/Slides/Foss/slide.h>
#include <Aspose/Slides/Foss/slide_collection.h>
#include <Aspose/Slides/Foss/shape_collection.h>
#include <Aspose/Slides/Foss/auto_shape.h>
using namespace Aspose::Slides::Foss;
int main() {
Presentation pres;
auto& slide = pres.slides()[0];
auto& shape = slide.shapes().add_auto_shape(ShapeType::RECTANGLE, 50, 50, 400, 120);
shape.text_frame()->set_text("Hello, Aspose.Slides FOSS!");
pres.save("output.pptx", SaveFormat::PPTX);
return 0;
}Presentation verwendet RAII. Wenn das Objekt aus dem Umfang geht, werden automatisch interne Ressourcen freigegeben.
Nächste Schritte
Nach dem Erstellen des Buildings finden Sie im Entwicklerhandbuch Feature-Guides zu Formen, Textformatierung, Tabellen, Füllungen, Effekten, Rednernotizen, Kommentaren und Dokumenten.