# BoringLayout.Metrics

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

# Metrics

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/android/text/BoringLayout.Metrics "View this page in Java")  

```
open class Metrics : Paint.FontMetricsInt
```

|---|---|------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                            |||
| ↳ | [android.graphics.Paint.FontMetricsInt](https://developer.android.com/reference/kotlin/android/graphics/Paint.FontMetricsInt.html#) ||
|   | ↳ | [android.text.BoringLayout.Metrics](https://developer.android.com/reference/kotlin/android/text/BoringLayout.Metrics#) |

## Summary

|                                                 Public constructors                                                 ||
|------------------------------------------------------------------------------------------------------------------|---|
| [Metrics](https://developer.android.com/reference/kotlin/android/text/BoringLayout.Metrics#Metrics())`()` <br /> |

|                                                                                                                        Public methods                                                                                                                         ||
|------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| open[RectF](https://developer.android.com/reference/kotlin/android/graphics/RectF.html#) | [getDrawingBoundingBox](https://developer.android.com/reference/kotlin/android/text/BoringLayout.Metrics#getDrawingBoundingBox())`()` Returns drawing bounding box. |
| open[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)     | [toString](https://developer.android.com/reference/kotlin/android/text/BoringLayout.Metrics#toString())`()` <br />                                                  |

| Inherited functions ||
|---|---|
| From class[FontMetricsInt](https://developer.android.com/reference/kotlin/android/graphics/Paint.FontMetricsInt.html#) |------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [equals](https://developer.android.com/reference/kotlin/android/graphics/Paint.FontMetricsInt.html#equals(kotlin.Any))`(`other:` `[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)?`)` <br />                                                                                                                                                                                                                 | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)         | [hashCode](https://developer.android.com/reference/kotlin/android/graphics/Paint.FontMetricsInt.html#hashCode())`()` <br />                                                                                                                                                                                                                                                                                                             | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)       | [set](https://developer.android.com/reference/kotlin/android/graphics/Paint.FontMetricsInt.html#set(android.graphics.Paint.FontMetrics))`(`fontMetrics:` `[Paint.FontMetrics](https://developer.android.com/reference/kotlin/android/graphics/Paint.FontMetrics.html#)`)` <br /> Set values from[FontMetrics](https://developer.android.com/reference/kotlin/android/graphics/Paint.FontMetrics.html#)with rounding accordingly. <br /> | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)       | [set](https://developer.android.com/reference/kotlin/android/graphics/Paint.FontMetricsInt.html#set(android.graphics.Paint.FontMetricsInt))`(`fontMetricsInt:` `[Paint.FontMetricsInt](https://developer.android.com/reference/kotlin/android/graphics/Paint.FontMetricsInt.html#)`)` <br /> Set values from[FontMetricsInt](https://developer.android.com/reference/kotlin/android/graphics/Paint.FontMetricsInt.html#). <br />        | ||

|                                                                                          Properties                                                                                           ||
|----------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------|
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [width](https://developer.android.com/reference/kotlin/android/text/BoringLayout.Metrics#width:kotlin.Int) <br /> |

| Inherited properties ||
|---|---|
| From class[FontMetricsInt](https://developer.android.com/reference/kotlin/android/graphics/Paint.FontMetricsInt.html#) |----------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [ascent](https://developer.android.com/reference/kotlin/android/graphics/Paint.FontMetricsInt.html#ascent:kotlin.Int) <br /> The recommended distance above the baseline for singled spaced text. <br />                           | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [bottom](https://developer.android.com/reference/kotlin/android/graphics/Paint.FontMetricsInt.html#bottom:kotlin.Int) <br /> The maximum distance below the baseline for the lowest glyph in the font at a given text size. <br /> | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [descent](https://developer.android.com/reference/kotlin/android/graphics/Paint.FontMetricsInt.html#descent:kotlin.Int) <br /> The recommended distance below the baseline for singled spaced text. <br />                         | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [leading](https://developer.android.com/reference/kotlin/android/graphics/Paint.FontMetricsInt.html#leading:kotlin.Int) <br /> The recommended additional space to add between lines of text. <br />                               | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [top](https://developer.android.com/reference/kotlin/android/graphics/Paint.FontMetricsInt.html#top:kotlin.Int) <br /> The maximum distance above the baseline for the tallest glyph in the font at a given text size. <br />      | ||

## Public constructors

### Metrics

```
Metrics()
```

## Public methods

### getDrawingBoundingBox

Added in[API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
open fun getDrawingBoundingBox(): RectF
```

Returns drawing bounding box.

|                                                                  Return                                                                   ||
|--------------------------------------------------------------------------------------|-----------------------------------------------------|
| [RectF](https://developer.android.com/reference/kotlin/android/graphics/RectF.html#) | a drawing bounding box. This value cannot be`null`. |

### toString

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
open fun toString(): String
```

|                                                          Return                                                          ||
|----------------------------------------------------------------------------------|----------------------------------------|
| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | a string representation of the object. |

## Properties

### width

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
var width: Int
```