TextFrame — Aspose.Slides FOSS for C++ API Reference

Examples TextFrame class gestiona el contenido de texto de un AutoShape o tabla Cell. Contiene párrafos y proporciona acceso directo al texto.

Examples: Aspose::Slides::Foss

#include <Aspose/Slides/Foss/text_frame.h>
class TextFrame

Examples: include/Aspose/Slides/Foss/text_frame.h


Examples

ExamplesExamplesExamples
text()ExamplesDevuelve el texto concatenado de todos los párrafos.
set_text(const std::string&)ExamplesReemplaza todo el contenido de texto.

Interfaz ITextFrame

Examples ITextFrame interfaz (de i_text_frame.h) define:

ExamplesExamples
text()Obtener el contenido de texto.
set_text(const std::string&)Establecer el contenido de texto.

Interfaz ITextFrameFormat

Examples ITextFrameFormat interfaz controla el diseño del marco de texto:

ExamplesExamplesExamples
margin_left() / set_margin_left(double)Lectura/EscrituraMargen izquierdo en puntos.
margin_right() / set_margin_right(double)Lectura/EscrituraMargen derecho en puntos.
margin_top() / set_margin_top(double)Lectura/EscrituraMargen superior en puntos.
margin_bottom() / set_margin_bottom(double)Lectura/EscrituraMargen inferior en puntos.
wrap_text() / set_wrap_text(NullableBool)Lectura/EscrituraSi el texto se ajusta.
anchoring_type() / set_anchoring_type(TextAnchorType)Lectura/EscrituraAnclaje vertical del texto.
center_text() / set_center_text(NullableBool)Lectura/EscrituraSi el texto está centrado verticalmente.

Ejemplo de uso

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

Ver también

 Español