Package icyllis.modernui.text.style
Class MetricAffectingSpan
java.lang.Object
icyllis.modernui.text.style.CharacterStyle
icyllis.modernui.text.style.MetricAffectingSpan
- All Implemented Interfaces:
UpdateAppearance
,UpdateLayout
- Direct Known Subclasses:
AbsoluteSizeSpan
,CodeBlockSpan
,HeadingSpan
,LocaleSpan
,RelativeSizeSpan
,ReplacementSpan
,StyleSpan
,SubscriptSpan
,SuperscriptSpan
,TypefaceSpan
The classes that affect character-level text formatting in a way that
changes the metric of characters extend this class.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns "this" for most MetricAffectingSpans, but for MetricAffectingSpans that were generated byCharacterStyle.wrap(icyllis.modernui.text.style.CharacterStyle)
, returns the underlying MetricAffectingSpan.void
updateDrawState
(TextPaint paint) abstract void
updateMeasureState
(TextPaint paint) Classes that extend MetricAffectingSpan implement this method to update the text formatting in a way that can change the width or height of characters.Methods inherited from class icyllis.modernui.text.style.CharacterStyle
wrap
-
Constructor Details
-
MetricAffectingSpan
public MetricAffectingSpan()
-
-
Method Details
-
updateDrawState
- Specified by:
updateDrawState
in classCharacterStyle
-
updateMeasureState
Classes that extend MetricAffectingSpan implement this method to update the text formatting in a way that can change the width or height of characters.- Parameters:
paint
- the paint used for measuring the text
-
getUnderlying
Returns "this" for most MetricAffectingSpans, but for MetricAffectingSpans that were generated byCharacterStyle.wrap(icyllis.modernui.text.style.CharacterStyle)
, returns the underlying MetricAffectingSpan.- Overrides:
getUnderlying
in classCharacterStyle
-