| 81 | |
| 82 | constexpr TextLayoutLineHeight(Kind kind, Scalar value) : _kind(kind), _value(value) {} |
| 83 | }; |
| 84 | |
| 85 | enum TextLayoutDecorationStyle { |
| 86 | TextLayoutDecorationStyleSolid, |
| 87 | TextLayoutDecorationStyleDashed, |
| 88 | TextLayoutDecorationStyleDotted, |
| 89 | }; |
| 90 | |
| 91 | struct TextCustomUnderlineStyle { |
| 92 | Scalar height = 0; |
| 93 | Scalar onWidth = 0; |
| 94 | Scalar offWidth = 0; |
| 95 | Scalar offset = 0; |
| 96 | |
| 97 | constexpr TextCustomUnderlineStyle() = default; |
| 98 | constexpr TextCustomUnderlineStyle(Scalar height, Scalar onWidth, Scalar offWidth, Scalar offset) |
| 99 | : height(height), onWidth(onWidth), offWidth(offWidth), offset(offset) {} |
| 100 | |
| 101 | constexpr bool isPatterned() const { |
| 102 | return onWidth > 0 && offWidth > 0; |
| 103 | } |
| 104 | |
| 105 | constexpr bool operator==(const TextCustomUnderlineStyle& other) const { |
| 106 | return height == other.height && onWidth == other.onWidth && offWidth == other.offWidth && |
| 107 | offset == other.offset; |
| 108 | } |
| 109 | |
| 110 | constexpr bool operator!=(const TextCustomUnderlineStyle& other) const { |
| 111 | return !(*this == other); |
| 112 | } |
| 113 | }; |
| 114 | |
| 115 | enum TextLayoutVisualEntryKind { |
| 116 | TextLayoutVisualEntryKindBackground, |
| 117 | TextLayoutVisualEntryKindDecoration, |
no outgoing calls