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 | |
open Int |
hashCode() |
open Unit |
set(fontMetricsInt: Paint.FontMetricsInt) Set values from |
open Unit |
set(fontMetrics: Paint.FontMetrics) Set values from |
open String |
toString() |
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
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
open fun hashCode(): Int
Return | |
---|---|
Int |
a hash code value for this object. |
set
open fun set(fontMetricsInt: Paint.FontMetricsInt): Unit
Set values from FontMetricsInt
.
Parameters | |
---|---|
fontMetricsInt |
Paint.FontMetricsInt: a font metrics. This value cannot be null . |
set
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
open fun toString(): String
Return | |
---|---|
String |
a string representation of the object. |
Properties
ascent
var ascent: Int
The recommended distance above the baseline for singled spaced text.
bottom
var bottom: Int
The maximum distance below the baseline for the lowest glyph in the font at a given text size.
descent
var descent: Int
The recommended distance below the baseline for singled spaced text.
leading
var leading: Int
The recommended additional space to add between lines of text.
top
var top: Int
The maximum distance above the baseline for the tallest glyph in the font at a given text size.