Flutter Engine
The Flutter Engine
Functions
paragraph_bindings_gen.cpp File Reference
#include "modules/skparagraph/include/DartTypes.h"
#include "modules/skparagraph/include/Paragraph.h"
#include "modules/skunicode/include/SkUnicode.h"
#include <emscripten/bind.h>

Go to the source code of this file.

Functions

 EMSCRIPTEN_BINDINGS (ParagraphGen)
 

Function Documentation

◆ EMSCRIPTEN_BINDINGS()

EMSCRIPTEN_BINDINGS ( ParagraphGen  )

Definition at line 20 of file paragraph_bindings_gen.cpp.

20 {
21 enum_<para::Affinity>("Affinity")
22 .value("Upstream", para::Affinity::kUpstream)
23 .value("Downstream", para::Affinity::kDownstream);
24
25 enum_<para::TextDecorationStyle>("DecorationStyle")
31
32 enum_<SkFontStyle::Slant>("FontSlant")
33 .value("Upright", SkFontStyle::Slant::kUpright_Slant)
34 .value("Italic", SkFontStyle::Slant::kItalic_Slant)
35 .value("Oblique", SkFontStyle::Slant::kOblique_Slant);
36
37 enum_<SkFontStyle::Weight>("FontWeight")
38 .value("Invisible", SkFontStyle::Weight::kInvisible_Weight)
39 .value("Thin", SkFontStyle::Weight::kThin_Weight)
40 .value("ExtraLight", SkFontStyle::Weight::kExtraLight_Weight)
41 .value("Light", SkFontStyle::Weight::kLight_Weight)
42 .value("Normal", SkFontStyle::Weight::kNormal_Weight)
43 .value("Medium", SkFontStyle::Weight::kMedium_Weight)
44 .value("SemiBold", SkFontStyle::Weight::kSemiBold_Weight)
45 .value("Bold", SkFontStyle::Weight::kBold_Weight)
46 .value("ExtraBold", SkFontStyle::Weight::kExtraBold_Weight)
47 .value("Black", SkFontStyle::Weight::kBlack_Weight)
48 .value("ExtraBlack", SkFontStyle::Weight::kExtraBlack_Weight);
49
50 enum_<SkFontStyle::Width>("FontWidth")
51 .value("UltraCondensed", SkFontStyle::Width::kUltraCondensed_Width)
52 .value("ExtraCondensed", SkFontStyle::Width::kExtraCondensed_Width)
53 .value("Condensed", SkFontStyle::Width::kCondensed_Width)
54 .value("SemiCondensed", SkFontStyle::Width::kSemiCondensed_Width)
55 .value("Normal", SkFontStyle::Width::kNormal_Width)
56 .value("SemiExpanded", SkFontStyle::Width::kSemiExpanded_Width)
57 .value("Expanded", SkFontStyle::Width::kExpanded_Width)
58 .value("ExtraExpanded", SkFontStyle::Width::kExtraExpanded_Width)
59 .value("UltraExpanded", SkFontStyle::Width::kUltraExpanded_Width);
60
61 enum_<para::PlaceholderAlignment>("PlaceholderAlignment")
63 .value("AboveBaseline", para::PlaceholderAlignment::kAboveBaseline)
64 .value("BelowBaseline", para::PlaceholderAlignment::kBelowBaseline)
68
69 enum_<para::RectHeightStyle>("RectHeightStyle")
70 .value("Tight", para::RectHeightStyle::kTight)
71 .value("Max", para::RectHeightStyle::kMax)
72 .value("IncludeLineSpacingMiddle", para::RectHeightStyle::kIncludeLineSpacingMiddle)
73 .value("IncludeLineSpacingTop", para::RectHeightStyle::kIncludeLineSpacingTop)
74 .value("IncludeLineSpacingBottom", para::RectHeightStyle::kIncludeLineSpacingBottom)
75 .value("Strut", para::RectHeightStyle::kStrut);
76
77 enum_<para::RectWidthStyle>("RectWidthStyle")
78 .value("Tight", para::RectWidthStyle::kTight)
79 .value("Max", para::RectWidthStyle::kMax);
80
81 enum_<para::TextAlign>("TextAlign")
82 .value("Left", para::TextAlign::kLeft)
83 .value("Right", para::TextAlign::kRight)
84 .value("Center", para::TextAlign::kCenter)
85 .value("Justify", para::TextAlign::kJustify)
86 .value("Start", para::TextAlign::kStart)
87 .value("End", para::TextAlign::kEnd);
88
89 enum_<para::TextBaseline>("TextBaseline")
90 .value("Alphabetic", para::TextBaseline::kAlphabetic)
91 .value("Ideographic", para::TextBaseline::kIdeographic);
92
93 enum_<para::TextDirection>("TextDirection")
94 .value("LTR", para::TextDirection::kLtr)
95 .value("RTL", para::TextDirection::kRtl);
96
97 enum_<para::TextHeightBehavior>("TextHeightBehavior")
98 .value("All", para::TextHeightBehavior::kAll)
99 .value("DisableFirstAscent", para::TextHeightBehavior::kDisableFirstAscent)
100 .value("DisableLastDescent", para::TextHeightBehavior::kDisableLastDescent)
101 .value("DisableAll", para::TextHeightBehavior::kDisableAll);
102
103 enum_<SkUnicode::LineBreakType>("LineBreakType")
104 .value("SoftLineBreak", SkUnicode::LineBreakType::kSoftLineBreak)
105 .value("HardLineBreak", SkUnicode::LineBreakType::kHardLineBreak);
106}
@ kBaseline
Match the baseline of the placeholder with the baseline.
@ kAlphabetic
Definition: text_baseline.h:23