Added in API level 1

Metrics


open class Metrics : Paint.FontMetricsInt

Summary

Public constructors

Public methods
open RectF

Returns drawing bounding box.

open String

Inherited functions
Boolean equals(other: Any?)

Int hashCode()

Unit set(fontMetrics: Paint.FontMetrics)

Set values from FontMetrics with rounding accordingly.

Unit set(fontMetricsInt: Paint.FontMetricsInt)

Set values from FontMetricsInt.

Properties
Int

Inherited properties
Int ascent

The recommended distance above the baseline for singled spaced text.

Int bottom

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

Int descent

The recommended distance below the baseline for singled spaced text.

Int leading

The recommended additional space to add between lines of text.

Int top

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

Public constructors

Metrics

Metrics()

Public methods

getDrawingBoundingBox

Added in API level 35
open fun getDrawingBoundingBox(): RectF

Returns drawing bounding box.

Return
RectF a drawing bounding box. This value cannot be null.

toString

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

Properties

width

Added in API level 1
var width: Int