| Flutter Impeller |

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

`#include <paragraph_style.h>`

Inheritance diagram for impeller::interop::ParagraphStyle:

## Public Member Functions
| ParagraphStyle ()
| ~ParagraphStyle () override
| ParagraphStyle (const ParagraphStyle &)=delete
ParagraphStyle & | operator= (const ParagraphStyle &)=delete
void | SetForeground (ScopedObject< Paint > paint)
void | SetBackground (ScopedObject< Paint > paint)
void | SetFontWeight (txt::FontWeight weight)
void | SetFontStyle (txt::FontStyle style)
void | SetFontFamily (std::string family)
void | SetFontSize (double size)
void | SetHeight (double height)
void | SetTextAlignment (txt::TextAlign alignment)
void | SetTextDirection (txt::TextDirection direction)
void | SetMaxLines (size_t max_lines)
void | SetLocale (std::string locale)
txt::TextStyle | CreateTextStyle () 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< ParagraphStyle, IMPELLER_INTERNAL_HANDLE_NAME(ImpellerParagraphStyle)>
using | InteropClass = ParagraphStyle
using | InteropCSibling = IMPELLER_INTERNAL_HANDLE_NAME(ImpellerParagraphStyle)
Static Public Member Functions inherited from impeller::interop::ObjectBase
static void | SafeRetain (void *ptr)
static void | SafeRelease (void *ptr)

## Detailed Description

Definition at line 15 of file paragraph_style.h.

## Constructor & Destructor Documentation

## ◆ ParagraphStyle() [1/2]

impeller::interop::ParagraphStyle::ParagraphStyle | ( |  | ) |
| explicitdefault

## ◆ ~ParagraphStyle()

impeller::interop::ParagraphStyle::~ParagraphStyle | ( |  | ) |
| overridedefault

## ◆ ParagraphStyle() [2/2]

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

## Member Function Documentation

## ◆ CreateTextStyle()

txt::TextStyle impeller::interop::ParagraphStyle::CreateTextStyle | ( |  | ) | const

Definition at line 57 of file paragraph_style.cc.

57 {
58 auto style = style_.GetTextStyle();
59 if (foreground_) {
60 style.foreground = foreground_->GetPaint();
61 }
62 if (backgrond_) {
63 style.background = backgrond_->GetPaint();
64 }
65 return style;
66 }

Referenced by impeller::interop::ParagraphBuilder::PushStyle().

## ◆ operator=()

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

## ◆ SetBackground()

void impeller::interop::ParagraphStyle::SetBackground | ( | ScopedObject< Paint > | paint | ) |

Definition at line 53 of file paragraph_style.cc.

53 {
54 backgrond_ = std::move(paint);
55 }

## ◆ SetFontFamily()

void impeller::interop::ParagraphStyle::SetFontFamily | ( | std::string | family | ) |

Definition at line 21 of file paragraph_style.cc.

21 {
22 style_.font_family = std::move(family);
23 }

## ◆ SetFontSize()

void impeller::interop::ParagraphStyle::SetFontSize | ( | double | size | ) |

Definition at line 25 of file paragraph_style.cc.

25 {
26 style_.font_size = size;
27 }

## ◆ SetFontStyle()

void impeller::interop::ParagraphStyle::SetFontStyle | ( | txt::FontStyle | style | ) |

Definition at line 17 of file paragraph_style.cc.

17 {
18 style_.font_style = style;
19 }

## ◆ SetFontWeight()

void impeller::interop::ParagraphStyle::SetFontWeight | ( | txt::FontWeight | weight | ) |

Definition at line 13 of file paragraph_style.cc.

13 {
14 style_.font_weight = weight;
15 }

## ◆ SetForeground()

void impeller::interop::ParagraphStyle::SetForeground | ( | ScopedObject< Paint > | paint | ) |

Definition at line 49 of file paragraph_style.cc.

49 {
50 foreground_ = std::move(paint);
51 }

## ◆ SetHeight()

void impeller::interop::ParagraphStyle::SetHeight | ( | double | height | ) |

Definition at line 29 of file paragraph_style.cc.

29 {
30 style_.height = height;
31 }

## ◆ SetLocale()

void impeller::interop::ParagraphStyle::SetLocale | ( | std::string | locale | ) |

Definition at line 45 of file paragraph_style.cc.

45 {
46 style_.locale = std::move(locale);
47 }

## ◆ SetMaxLines()

void impeller::interop::ParagraphStyle::SetMaxLines | ( | size_t | max_lines | ) |

Definition at line 41 of file paragraph_style.cc.

41 {
42 style_.max_lines = max_lines;
43 }

## ◆ SetTextAlignment()

void impeller::interop::ParagraphStyle::SetTextAlignment | ( | txt::TextAlign | alignment | ) |

Definition at line 33 of file paragraph_style.cc.

33 {
34 style_.text_align = alignment;
35 }

## ◆ SetTextDirection()

void impeller::interop::ParagraphStyle::SetTextDirection | ( | txt::TextDirection | direction | ) |

Definition at line 37 of file paragraph_style.cc.

37 {
38 style_.text_direction = direction;
39 }

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

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