Flutter Engine
 
Loading...
Searching...
No Matches
paragraph_style.h
Go to the documentation of this file.
1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef FLUTTER_IMPELLER_TOOLKIT_INTEROP_PARAGRAPH_STYLE_H_
6#define FLUTTER_IMPELLER_TOOLKIT_INTEROP_PARAGRAPH_STYLE_H_
7
12
13namespace impeller::interop {
14
15class ParagraphStyle final
16 : public Object<ParagraphStyle,
17 IMPELLER_INTERNAL_HANDLE_NAME(ImpellerParagraphStyle)> {
18 public:
19 explicit ParagraphStyle();
20
21 ~ParagraphStyle() override;
22
24
26
28
30
31 void SetFontWeight(int weight);
32
33 void SetFontStyle(txt::FontStyle style);
34
35 void SetFontFamily(std::string family);
36
37 void SetFontSize(double size);
38
39 void SetHeight(double height);
40
41 void SetTextAlignment(txt::TextAlign alignment);
42
44
45 void SetTextDecoration(const ImpellerTextDecoration& decoration);
46
47 void SetMaxLines(size_t max_lines);
48
49 void SetLocale(std::string locale);
50
51 void SetEllipsis(const std::string& string);
52
54
56
57 private:
59 ScopedObject<Paint> foreground_;
60 ScopedObject<Paint> background_;
61 std::optional<ImpellerTextDecoration> decoration_;
62};
63
64} // namespace impeller::interop
65
66#endif // FLUTTER_IMPELLER_TOOLKIT_INTEROP_PARAGRAPH_STYLE_H_
ParagraphStyle(const ParagraphStyle &)=delete
ParagraphStyle & operator=(const ParagraphStyle &)=delete
void SetFontFamily(std::string family)
void SetTextDecoration(const ImpellerTextDecoration &decoration)
void SetTextDirection(txt::TextDirection direction)
void SetBackground(ScopedObject< Paint > paint)
void SetForeground(ScopedObject< Paint > paint)
txt::TextStyle CreateTextStyle() const
void SetLocale(std::string locale)
void SetFontStyle(txt::FontStyle style)
void SetEllipsis(const std::string &string)
const txt::ParagraphStyle & GetParagraphStyle() const
void SetMaxLines(size_t max_lines)
void SetTextAlignment(txt::TextAlign alignment)
FontStyle
Definition font_style.h:10
int32_t height