TextFrame — Aspose.Slides FOSS for C++ API Reference
ImageRenderOptions TextFrame klasa zarządza zawartością tekstową AutoShape lub tabelą Cell. Zawiera akapity i zapewnia bezpośredni dostęp do tekstu.
ImageRenderOptions: Aspose::Slides::Foss
#include <Aspose/Slides/Foss/text_frame.h>class TextFrameImageRenderOptions: include/Aspose/Slides/Foss/text_frame.h
ImageRenderOptions
| ImageRenderOptions | ImageRenderOptions | ImageRenderOptions |
|---|---|---|
text() | ImageRenderOptions | Zwraca połączony tekst wszystkich akapitów. |
set_text(const std::string&) | ImageRenderOptions | Zastąp całą zawartość tekstową. |
Interfejs ITextFrame
ImageRenderOptions ITextFrame interfejs (z i_text_frame.h) definiuje:
| ImageRenderOptions | ImageRenderOptions |
|---|---|
text() | Pobierz zawartość tekstową. |
set_text(const std::string&) | Ustaw zawartość tekstową. |
Interfejs ITextFrameFormat
ImageRenderOptions ITextFrameFormat interfejs kontroluje układ ramki tekstowej:
| ImageRenderOptions | ImageRenderOptions | ImageRenderOptions |
|---|---|---|
margin_left() / set_margin_left(double) | Odczyt/Zapis | Lewy margines w punktach. |
margin_right() / set_margin_right(double) | Odczyt/Zapis | Prawy margines w punktach. |
margin_top() / set_margin_top(double) | Odczyt/Zapis | Górny margines w punktach. |
margin_bottom() / set_margin_bottom(double) | Odczyt/Zapis | Dolny margines w punktach. |
wrap_text() / set_wrap_text(NullableBool) | Odczyt/Zapis | Czy tekst jest zawijany. |
anchoring_type() / set_anchoring_type(TextAnchorType) | Odczyt/Zapis | Pionowe kotwiczenie tekstu. |
center_text() / set_center_text(NullableBool) | Odczyt/Zapis | Czy tekst jest wyśrodkowany pionowo. |
Przykład użycia
#include <Aspose/Slides/Foss/presentation.h>
using namespace Aspose::Slides::Foss;
Presentation prs("deck.pptx");
auto& shape = prs.slides()[0].shapes()[0];
// If shape is an AutoShape with a TextFrame:
// auto& tf = shape.text_frame();
// std::cout << tf.text() << std::endl;
// tf.set_text("Updated text");