The TextLineMetrics class contains information about the text position and measurements of a line of text within a text field. All measurements are in pixels. Objects of this class are returned by the `flash.text.TextField.getLineMetrics()` method.

### Hierarchy

- TextLineMetrics

## Index

### Constructors

- constructor

### Properties

- ascent
- descent
- height
- leading
- width
- x

## Constructors

### constructor

- new TextLineMetrics(x: number, width: number, height: number, ascent: number, descent: number, leading: number): TextLineMetrics

- - Defined in lib/openfl/text/TextLineMetrics.d.ts:51

  Creates a TextLineMetrics object. The TextLineMetrics object contains information about the text metrics of a line of text in a text field. Objects of this class are returned by the flash.text.TextField.getLineMetrics() method.

  #### Parameters

  - ##### x: number

    The left position of the first character in pixels.

  - ##### width: number

    The width of the text of the selected lines (not necessarily the complete text) in pixels.

  - ##### height: number

    The height of the text of the selected lines (not necessarily the complete text) in pixels.

  - ##### ascent: number

    The length from the baseline to the top of the line height in pixels.

  - ##### descent: number

    The length from the baseline to the bottom depth of the line in pixels.

  - ##### leading: number

    The measurement of the vertical distance between the lines of text.

  #### Returns TextLineMetrics

## Properties

### ascent

ascent: number

- Defined in lib/openfl/text/TextLineMetrics.d.ts:17

The ascent value of the text is the length from the baseline to the top of the line height in pixels.

### descent

descent: number

- Defined in lib/openfl/text/TextLineMetrics.d.ts:23

The descent value of the text is the length from the baseline to the bottom depth of the line in pixels.

### height

height: number

- Defined in lib/openfl/text/TextLineMetrics.d.ts:30

The height value of the text of the selected lines (not necessarily the complete text) in pixels. The height of the text line does not include the gutter height.

### leading

leading: number

- Defined in lib/openfl/text/TextLineMetrics.d.ts:36

The leading value is the measurement of the vertical distance between the lines of text.

### width

width: number

- Defined in lib/openfl/text/TextLineMetrics.d.ts:45

The width value is the width of the text of the selected lines (not necessarily the complete text) in pixels. The width of the text line is not the same as the width of the text field. The width of the text line is relative to the text field width, minus the gutter width of 4 pixels (2 pixels on each side).

### x

x: number

- Defined in lib/openfl/text/TextLineMetrics.d.ts:51

The x value is the left position of the first character in pixels. This value includes the margin, indent (if any), and gutter widths.

Generated using TypeDoc