@@ -56,7 +56,7 @@ object TextLayoutUtils {
5656 fun addText (
5757 sb : SpannableStringBuilder , text : String? , textAttributeProvider : EffectiveTextAttributeProvider
5858 ) {
59- sb.append(TextTransform .apply (text, textAttributeProvider.getTextTransform() ))
59+ sb.append(TextTransform .apply (text, textAttributeProvider.textTransform ))
6060 }
6161
6262 fun addInlineViewPlaceholderSpan (
@@ -114,8 +114,8 @@ object TextLayoutUtils {
114114 end : Int
115115 ) {
116116 val roleIsLink =
117- textAttributeProvider.getRole() ?.let { it == ReactAccessibilityDelegate .Role .LINK }
118- ? : (textAttributeProvider.getAccessibilityRole() == ReactAccessibilityDelegate .AccessibilityRole .LINK )
117+ textAttributeProvider.role ?.let { it == ReactAccessibilityDelegate .Role .LINK }
118+ ? : (textAttributeProvider.accessibilityRole == ReactAccessibilityDelegate .AccessibilityRole .LINK )
119119 if (roleIsLink) {
120120 ops.add(SetSpanOperation (start, end, ReactClickableSpan (reactTag)))
121121 }
@@ -127,10 +127,10 @@ object TextLayoutUtils {
127127 start : Int ,
128128 end : Int
129129 ) {
130- if (textAttributeProvider.isColorSet() ) {
130+ if (textAttributeProvider.isColorSet) {
131131 ops.add(
132132 SetSpanOperation (
133- start, end, ReactForegroundColorSpan (textAttributeProvider.getColor() )
133+ start, end, ReactForegroundColorSpan (textAttributeProvider.color )
134134 )
135135 )
136136 }
@@ -142,10 +142,10 @@ object TextLayoutUtils {
142142 start : Int ,
143143 end : Int
144144 ) {
145- if (textAttributeProvider.isBackgroundColorSet() ) {
145+ if (textAttributeProvider.isBackgroundColorSet) {
146146 ops.add(
147147 SetSpanOperation (
148- start, end, ReactBackgroundColorSpan (textAttributeProvider.getBackgroundColor() )
148+ start, end, ReactBackgroundColorSpan (textAttributeProvider.backgroundColor )
149149 )
150150 )
151151 }
@@ -157,7 +157,7 @@ object TextLayoutUtils {
157157 start : Int ,
158158 end : Int
159159 ) {
160- val effectiveLetterSpacing = textAttributeProvider.getEffectiveLetterSpacing()
160+ val effectiveLetterSpacing = textAttributeProvider.effectiveLetterSpacing
161161
162162 if (! effectiveLetterSpacing.isNaN()) {
163163 ops.add(SetSpanOperation (start, end, CustomLetterSpacingSpan (effectiveLetterSpacing)))
@@ -170,7 +170,7 @@ object TextLayoutUtils {
170170 start : Int ,
171171 end : Int
172172 ) {
173- val effectiveFontSize = textAttributeProvider.getEffectiveFontSize()
173+ val effectiveFontSize = textAttributeProvider.effectiveFontSize
174174
175175 if (effectiveFontSize != UNSET ) {
176176 ops.add(SetSpanOperation (start, end, ReactAbsoluteSizeSpan (effectiveFontSize)))
@@ -184,17 +184,17 @@ object TextLayoutUtils {
184184 start : Int ,
185185 end : Int
186186 ) {
187- val fontStyle = textAttributeProvider.getFontStyle()
188- val fontWeight = textAttributeProvider.getFontWeight()
189- val fontFamily = textAttributeProvider.getFontFamily()
187+ val fontStyle = textAttributeProvider.fontStyle
188+ val fontWeight = textAttributeProvider.fontWeight
189+ val fontFamily = textAttributeProvider.fontFamily
190190
191191 if (fontStyle != UNSET || fontWeight != UNSET || fontFamily != null ) {
192192 ops.add(
193193 SetSpanOperation (
194194 start, end, CustomStyleSpan (
195195 fontStyle,
196196 fontWeight,
197- textAttributeProvider.getFontFeatureSettings() ,
197+ textAttributeProvider.fontFeatureSettings ,
198198 fontFamily,
199199 context.assets
200200 )
@@ -209,7 +209,7 @@ object TextLayoutUtils {
209209 start : Int ,
210210 end : Int
211211 ) {
212- if (textAttributeProvider.isUnderlineTextDecorationSet() ) {
212+ if (textAttributeProvider.isUnderlineTextDecorationSet) {
213213 ops.add(SetSpanOperation (start, end, ReactUnderlineSpan ()))
214214 }
215215 }
@@ -220,7 +220,7 @@ object TextLayoutUtils {
220220 start : Int ,
221221 end : Int
222222 ) {
223- if (textAttributeProvider.isLineThroughTextDecorationSet() ) {
223+ if (textAttributeProvider.isLineThroughTextDecorationSet) {
224224 ops.add(SetSpanOperation (start, end, ReactStrikethroughSpan ()))
225225 }
226226 }
@@ -232,18 +232,18 @@ object TextLayoutUtils {
232232 end : Int
233233 ) {
234234 val hasTextShadowOffset =
235- textAttributeProvider.getTextShadowOffsetDx() != 0f || textAttributeProvider.getTextShadowOffsetDy() != 0f
236- val hasTextShadowRadius = textAttributeProvider.getTextShadowRadius() != 0f
237- val hasTextShadowColorAlpha = Color .alpha(textAttributeProvider.getTextShadowColor() ) != 0
235+ textAttributeProvider.textShadowOffsetDx != 0f || textAttributeProvider.textShadowOffsetDy != 0f
236+ val hasTextShadowRadius = textAttributeProvider.textShadowRadius != 0f
237+ val hasTextShadowColorAlpha = Color .alpha(textAttributeProvider.textShadowColor ) != 0
238238
239239 if ((hasTextShadowOffset || hasTextShadowRadius) && hasTextShadowColorAlpha) {
240240 ops.add(
241241 SetSpanOperation (
242242 start, end, ShadowStyleSpan (
243- textAttributeProvider.getTextShadowOffsetDx() ,
244- textAttributeProvider.getTextShadowOffsetDy() ,
245- textAttributeProvider.getTextShadowRadius() ,
246- textAttributeProvider.getTextShadowColor()
243+ textAttributeProvider.textShadowOffsetDx ,
244+ textAttributeProvider.textShadowOffsetDy ,
245+ textAttributeProvider.textShadowRadius ,
246+ textAttributeProvider.textShadowColor
247247 )
248248 )
249249 )
@@ -256,7 +256,7 @@ object TextLayoutUtils {
256256 start : Int ,
257257 end : Int
258258 ) {
259- val effectiveLineHeight = textAttributeProvider.getEffectiveLineHeight()
259+ val effectiveLineHeight = textAttributeProvider.effectiveLineHeight
260260 if (! effectiveLineHeight.isNaN()) {
261261 ops.add(SetSpanOperation (start, end, CustomLineHeightSpan (effectiveLineHeight)))
262262 }
0 commit comments