Added in API level 1

FontMetricsInt


open class FontMetricsInt
kotlin.Any
   ↳ android.graphics.Paint.FontMetricsInt

Convenience method for callers that want to have FontMetrics values as integers.

Summary

Public constructors

Public methods
open Boolean
equals(other: Any?)

open Int

open Unit
set(fontMetricsInt: Paint.FontMetricsInt)

Set values from FontMetricsInt.

open Unit
set(fontMetrics: Paint.FontMetrics)

Set values from FontMetrics with rounding accordingly.

open String

Properties
Int

The recommended distance above the baseline for singled spaced text.

Int

The maximum distance below the baseline for the lowest glyph in the font at a given text size.

Int

The recommended distance below the baseline for singled spaced text.

Int

The recommended additional space to add between lines of text.

Int

The maximum distance above the baseline for the tallest glyph in the font at a given text size.

Public constructors

FontMetricsInt

FontMetricsInt()

Public methods

equals

Added in API level 1
open fun equals(other: Any?): Boolean
Parameters
obj the reference object with which to compare.
Return
Boolean true if this object is the same as the obj argument; false otherwise.

hashCode

Added in API level 1
open fun hashCode(): Int
Return
Int a hash code value for this object.

set

Added in API level 35
open fun set(fontMetricsInt: Paint.FontMetricsInt): Unit

Set values from FontMetricsInt.

Parameters
fontMetricsInt Paint.FontMetricsInt: a font metrics. This value cannot be null.

set

Added in API level 35
open fun set(fontMetrics: Paint.FontMetrics): Unit

Set values from FontMetrics with rounding accordingly.

Parameters
fontMetrics Paint.FontMetrics: a font metrics. This value cannot be null.

toString

Added in API level 1
open fun toString(): String
Return
String a string representation of the object.

Properties

ascent

Added in API level 1
var ascent: Int

The recommended distance above the baseline for singled spaced text.

bottom

Added in API level 1
var bottom: Int

The maximum distance below the baseline for the lowest glyph in the font at a given text size.

descent

Added in API level 1
var descent: Int

The recommended distance below the baseline for singled spaced text.

leading

Added in API level 1
var leading: Int

The recommended additional space to add between lines of text.

top

Added in API level 1
var top: Int

The maximum distance above the baseline for the tallest glyph in the font at a given text size.