14 style_.font_weight = weight;
18 style_.font_style = style;
22 style_.font_family = std::move(family);
26 style_.font_size = size;
30 style_.height = height;
31 style_.has_height_override = (height != 0.0);
35 style_.text_align = alignment;
39 style_.text_direction = direction;
43 style_.max_lines = max_lines;
47 style_.locale = std::move(locale);
51 foreground_ = std::move(paint);
55 background_ = std::move(paint);
59 auto style = style_.GetTextStyle();
62 style.foreground = foreground_->GetPaint();
65 style.background = background_->GetPaint();
~ParagraphStyle() override
void SetFontWeight(txt::FontWeight weight)
void SetFontFamily(std::string family)
void SetTextDirection(txt::TextDirection direction)
void SetHeight(double height)
void SetBackground(ScopedObject< Paint > paint)
void SetForeground(ScopedObject< Paint > paint)
txt::TextStyle CreateTextStyle() const
void SetLocale(std::string locale)
void SetFontSize(double size)
void SetFontStyle(txt::FontStyle style)
const txt::ParagraphStyle & GetParagraphStyle() const
void SetMaxLines(size_t max_lines)
void SetTextAlignment(txt::TextAlign alignment)