| Flutter Impeller |

Public Member Functions | List of all members
impeller::interop::ParagraphBuilder Class Referencefinal

`#include <paragraph_builder.h>`

Inheritance diagram for impeller::interop::ParagraphBuilder:

## Public Member Functions
| ParagraphBuilder (ScopedObject< TypographyContext > context)
| ~ParagraphBuilder () override
| ParagraphBuilder (const ParagraphBuilder &)=delete
ParagraphBuilder & | operator= (const ParagraphBuilder &)=delete
bool | IsValid () const
void | PushStyle (const ParagraphStyle &style)
void | PopStyle ()
void | AddText (const uint8_t *data, size_t byte_length)
ScopedObject< Paragraph > | Build (Scalar width) const
Public Member Functions inherited from impeller::interop::ObjectBase
| ObjectBase ()=default
virtual | ~ObjectBase ()=default
| ObjectBase (const ObjectBase &)=delete
| ObjectBase (ObjectBase &&)=delete
ObjectBase & | operator= (const ObjectBase &)=delete
ObjectBase & | operator= (ObjectBase &&)=delete
void | Retain ()
void | Release ()
uint64_t | GetRefCountForTests () const

## Additional Inherited Members
Public Types inherited from impeller::interop::Object< ParagraphBuilder, IMPELLER_INTERNAL_HANDLE_NAME(ImpellerParagraphBuilder)>
using | InteropClass = ParagraphBuilder
using | InteropCSibling = IMPELLER_INTERNAL_HANDLE_NAME(ImpellerParagraphBuilder)
Static Public Member Functions inherited from impeller::interop::ObjectBase
static void | SafeRetain (void *ptr)
static void | SafeRelease (void *ptr)

## Detailed Description

Definition at line 19 of file paragraph_builder.h.

## Constructor & Destructor Documentation

## ◆ ParagraphBuilder() [1/2]

impeller::interop::ParagraphBuilder::ParagraphBuilder | ( | ScopedObject< TypographyContext > | context | ) |
| explicit

Definition at line 13 of file paragraph_builder.cc.

14 : context_(std::move(context)) {}

## ◆ ~ParagraphBuilder()

impeller::interop::ParagraphBuilder::~ParagraphBuilder | ( |  | ) |
| override default

## ◆ ParagraphBuilder() [2/2]

impeller::interop::ParagraphBuilder::ParagraphBuilder | ( | const ParagraphBuilder & |  | ) |
| delete

## Member Function Documentation

## ◆ AddText()

void impeller::interop::ParagraphBuilder::AddText | ( | const uint8_t * | data,
|  | size_t | byte_length
| ) |  |

Definition at line 30 of file paragraph_builder.cc.

30 {
31 GetBuilder()->AddText(data, byte_length);
32 }

References data.

## ◆ Build()

ScopedObject< Paragraph > impeller::interop::ParagraphBuilder::Build | ( | Scalar | width | ) | const

Definition at line 34 of file paragraph_builder.cc.

34 {
35 auto txt_paragraph = GetBuilder()->Build();
36 if (!txt_paragraph) {
37 return nullptr;
38 }
39 txt_paragraph->Layout(width);
40 return Create<Paragraph>(std::move(txt_paragraph));
41 }

## ◆ IsValid()

bool impeller::interop::ParagraphBuilder::IsValid | ( |  | ) | const

Definition at line 18 of file paragraph_builder.cc.

18 {
19 return !!context_;
20 }

## ◆ operator=()

ParagraphBuilder& impeller::interop::ParagraphBuilder::operator= | ( | const ParagraphBuilder & |  | ) |
| delete

## ◆ PopStyle()

void impeller::interop::ParagraphBuilder::PopStyle | ( |  | ) |

Definition at line 26 of file paragraph_builder.cc.

26 {
27 GetBuilder()->Pop();
28 }

## ◆ PushStyle()

void impeller::interop::ParagraphBuilder::PushStyle | ( | const ParagraphStyle & | style | ) |

Definition at line 22 of file paragraph_builder.cc.

22 {
23 GetBuilder(style.GetParagraphStyle())->PushStyle(style.CreateTextStyle());
24 }

References impeller::interop::ParagraphStyle::CreateTextStyle(), and impeller::interop::ParagraphStyle::GetParagraphStyle().

The documentation for this class was generated from the following files:

- impeller/toolkit/interop/paragraph_builder.h
- impeller/toolkit/interop/paragraph_builder.cc

data
std::shared_ptr< const fml::Mapping > data
Definition: texture_gles.cc:64