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`

public abstract class MetricAffectingSpan extends CharacterStyle implements UpdateLayout
The classes that affect character-level text formatting in a way that changes the metric of characters extend this class.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `MetricAffectingSpan()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `MetricAffectingSpan`
  `getUnderlying()`
  Returns "this" for most MetricAffectingSpans, but for MetricAffectingSpans that were generated by `CharacterStyle.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`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### MetricAffectingSpan

    public MetricAffectingSpan()

- ## Method Details

  - ### updateDrawState

    public void updateDrawState(@Nonnull TextPaint paint)
    Specified by:
      `updateDrawState` in class `CharacterStyle`

  - ### updateMeasureState

    public abstract void updateMeasureState(@Nonnull 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.
    Parameters:
      `paint` - the paint used for measuring the text

  - ### getUnderlying

    public MetricAffectingSpan getUnderlying()
    Returns "this" for most MetricAffectingSpans, but for MetricAffectingSpans that were generated by `CharacterStyle.wrap(icyllis.modernui.text.style.CharacterStyle)`, returns the underlying MetricAffectingSpan.
    Overrides:
      `getUnderlying` in class `CharacterStyle`