50 bool apply_height_to_first_ascent,
51 bool apply_height_to_last_descent) {
52 skia::textlayout::TextHeightBehavior behavior;
53 if (!apply_height_to_first_ascent && !apply_height_to_last_descent) {
54 behavior = skia::textlayout::kDisableAll;
55 }
else if (!apply_height_to_last_descent) {
56 behavior = skia::textlayout::kDisableLastDescent;
57 }
else if (!apply_height_to_first_ascent) {
58 behavior = skia::textlayout::kDisableFirstAscent;
60 behavior = skia::textlayout::kAll;
SKWASM_EXPORT void paragraphStyle_setTextHeightBehavior(Skwasm::ParagraphStyle *style, bool apply_height_to_first_ascent, bool apply_height_to_last_descent)
SKWASM_EXPORT void paragraphStyle_setApplyRoundingHack(Skwasm::ParagraphStyle *style, bool apply_rounding_hack)
SKWASM_EXPORT void paragraphStyle_setTextDirection(Skwasm::ParagraphStyle *style, skia::textlayout::TextDirection direction)
SKWASM_EXPORT void paragraphStyle_setEllipsis(Skwasm::ParagraphStyle *style, SkString *ellipsis)
SKWASM_EXPORT void paragraphStyle_setStrutStyle(Skwasm::ParagraphStyle *style, skia::textlayout::StrutStyle *strut_style)
SKWASM_EXPORT void paragraphStyle_setHeight(Skwasm::ParagraphStyle *style, SkScalar height)
SKWASM_EXPORT void paragraphStyle_setMaxLines(Skwasm::ParagraphStyle *style, size_t max_lines)
SKWASM_EXPORT Skwasm::ParagraphStyle * paragraphStyle_create()
SKWASM_EXPORT void paragraphStyle_setTextAlign(Skwasm::ParagraphStyle *style, skia::textlayout::TextAlign align)
SKWASM_EXPORT void paragraphStyle_setTextStyle(Skwasm::ParagraphStyle *style, Skwasm::TextStyle *text_style)
SKWASM_EXPORT void paragraphStyle_dispose(Skwasm::ParagraphStyle *style)