Stay organized with collections
Save and categorize content based on your preferences.
Metrics
open class Metrics : Paint.FontMetricsInt
Summary
Public methods |
open RectF |
Returns drawing bounding box.
|
open String |
|
Inherited properties |
From class FontMetricsInt
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
Public methods
getDrawingBoundingBox
open fun getDrawingBoundingBox(): RectF
Returns drawing bounding box.
Return |
RectF |
a drawing bounding box. This value cannot be null . |
toString
open fun toString(): String
Return |
String |
a string representation of the object. |
Properties
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# BoringLayout.Metrics\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nMetrics\n=======\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/text/BoringLayout.Metrics \"View this page in Java\") \n\n```\nopen class Metrics : Paint.FontMetricsInt\n```\n\n|---|---|----------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) |||\n| ↳ | [android.graphics.Paint.FontMetricsInt](../graphics/Paint.FontMetricsInt.html#) ||\n| | ↳ | [android.text.BoringLayout.Metrics](#) |\n\nSummary\n-------\n\n| Public constructors ||\n|----------------------------------|---|\n| [Metrics](#Metrics())`()` \u003cbr /\u003e |\n\n| Public methods ||\n|---------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------|\n| open [RectF](../graphics/RectF.html#) | [getDrawingBoundingBox](#getDrawingBoundingBox())`()` Returns drawing bounding box. |\n| open [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [toString](#toString())`()` \u003cbr /\u003e |\n\n| Inherited functions ||\n|---|---|\n| From class [FontMetricsInt](../graphics/Paint.FontMetricsInt.html#) |------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [equals](../graphics/Paint.FontMetricsInt.html#equals(kotlin.Any))`(`other:` `[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)?`)` \u003cbr /\u003e | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [hashCode](../graphics/Paint.FontMetricsInt.html#hashCode())`()` \u003cbr /\u003e | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [set](../graphics/Paint.FontMetricsInt.html#set(android.graphics.Paint.FontMetrics))`(`fontMetrics:` `[Paint.FontMetrics](../graphics/Paint.FontMetrics.html#)`)` Set values from [FontMetrics](../graphics/Paint.FontMetrics.html#) with rounding accordingly. \u003cbr /\u003e | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [set](../graphics/Paint.FontMetricsInt.html#set(android.graphics.Paint.FontMetricsInt))`(`fontMetricsInt:` `[Paint.FontMetricsInt](../graphics/Paint.FontMetricsInt.html#)`)` Set values from [FontMetricsInt](../graphics/Paint.FontMetricsInt.html#). \u003cbr /\u003e | ||\n\n| Properties ||\n|----------------------------------------------------------------------------|-----------------------------------|\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [width](#width:kotlin.Int) \u003cbr /\u003e |\n\n| Inherited properties ||\n|---|---|\n| From class [FontMetricsInt](../graphics/Paint.FontMetricsInt.html#) |----------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [ascent](../graphics/Paint.FontMetricsInt.html#ascent:kotlin.Int) The recommended distance above the baseline for singled spaced text. \u003cbr /\u003e | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [bottom](../graphics/Paint.FontMetricsInt.html#bottom:kotlin.Int) The maximum distance below the baseline for the lowest glyph in the font at a given text size. \u003cbr /\u003e | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [descent](../graphics/Paint.FontMetricsInt.html#descent:kotlin.Int) The recommended distance below the baseline for singled spaced text. \u003cbr /\u003e | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [leading](../graphics/Paint.FontMetricsInt.html#leading:kotlin.Int) The recommended additional space to add between lines of text. \u003cbr /\u003e | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [top](../graphics/Paint.FontMetricsInt.html#top:kotlin.Int) The maximum distance above the baseline for the tallest glyph in the font at a given text size. \u003cbr /\u003e | ||\n\nPublic constructors\n-------------------\n\n### Metrics\n\n```\nMetrics()\n```\n\nPublic methods\n--------------\n\n### getDrawingBoundingBox\n\nAdded in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun getDrawingBoundingBox(): RectF\n```\n\nReturns drawing bounding box.\n\n| Return ||\n|----------------------------------|------------------------------------------------------|\n| [RectF](../graphics/RectF.html#) | a drawing bounding box. This value cannot be `null`. |\n\n### toString\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun toString(): String\n```\n\n| Return ||\n|----------------------------------------------------------------------------------|----------------------------------------|\n| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | a string representation of the object. |\n\nProperties\n----------\n\n### width\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nvar width: Int\n```"]]