Portion
ImageRenderOptions Portion 클래스는 동일한 문자 수준 서식이 적용된 텍스트 구간을 나타냅니다. Paragraph.
ImageRenderOptions: Aspose::Slides::Foss
#include <Aspose/Slides/Foss/portion.h>class PortionImageRenderOptions: include/Aspose/Slides/Foss/portion.h
ImageRenderOptions
| Name | Type | Access | Description |
|---|---|---|---|
Portion | Portion | Read | Gets the portion. |
ImageRenderOptions
| Signature | Description |
|---|---|
Portion() → Portion | Constructs an empty portion. |
Portion() | Constructs an empty portion. |
text() → std::string | Returns the text content of the portion. |
set_text(value: std::string) | Sets the text content of the portion. |
portion_format() → PortionFormat | Returns the portion format. |
portion_format() → PortionFormat | Returns the portion format. |
as_i_slide_component() → ISlideComponent | Returns this as ISlideComponent. |
as_i_slide_component() → ISlideComponent | Returns this as ISlideComponent. |
slide() → IBaseSlide | |
slide() → IBaseSlide | |
as_i_presentation_component() → IPresentationComponent | |
as_i_presentation_component() → IPresentationComponent | |
presentation() → IPresentation | |
presentation() → IPresentation | |
init_internal(r_element: pugi::xml_node, p_element: pugi::xml_node, txbody_element: pugi::xml_node, slide_part: Internal::pptx::SlidePart, parent_slide: IBaseSlide) | Initialize this portion from XML elements within a slide part. |
r_element() → pugi::xml_node | Returns the backing `` XML element, if any. |
p_element() → pugi::xml_node | Returns the backing `` XML element, if any. |
txbody_element() → pugi::xml_node | Returns the backing `` XML element, if any. |
slide_part() → Internal::pptx::SlidePart | Returns the owning SlidePart, or nullptr. |
set_slide(slide: IBaseSlide) | Sets the parent slide for this portion. |
IPortionFormat / PortionFormat
문자 수준 서식은 다음을 통해 관리됩니다. PortionFormat. 인터페이스를 통해 사용할 수 있는 주요 속성은 IBasePortionFormat 인터페이스는 다음에 대한 접근을 포함합니다:
FillFormat— 텍스트 채우기EffectFormat— 텍스트 효과LineFormat— 텍스트 외곽선ColorFormat— 텍스트 색상FontData— 글꼴 설정
사용 예시
#include <Aspose/Slides/Foss/presentation.h>
using namespace Aspose::Slides::Foss;
Presentation prs("deck.pptx");
// Access first shape's text frame paragraphs and portions
// auto& para = text_frame.paragraphs()[0];
// for (auto& portion : para.portions()) {
// std::cout << portion.text() << std::endl;
// }