# OfficeRichTextLine

Describes one measured line of rich text.

Class 

`OfficeIMO.Drawing`

**Namespace**

`OfficeIMO.Drawing`

**Assembly**

`OfficeIMO.Core`

**Source revision**

`ba882f6b0d07` with working tree changes

**Source**

[OfficeRichTextLine.cs:34](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeRichTextLine.cs#L34)

**Modifiers**

sealed

Describes one measured line of rich text.

## Inheritance

- object
- OfficeRichTextLine

## Usage

Explore 2 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Returned or exposed by 1

- Property [OfficeRichTextBlockLayout.Lines](/api/core/officeimo-drawing-officerichtextblocklayout/#property-lines)

### Accepted by parameters 1

- Constructor [OfficeRichTextBlockLayout.OfficeRichTextBlockLayout](/api/core/officeimo-drawing-officerichtextblocklayout/#constructor-ctor-collections-generic-ireadonlylist-officeimo-drawing-officerichtextline-double-double-double-boolean) parameter `lines`

Filter members 

Show inherited

## Constructors

OfficeRichTextLine 2 overloads

`public OfficeRichTextLine(IReadOnlyList<OfficeRichTextSegment> segments)` [#](#constructor-ctor-collections-generic-ireadonlylist-officeimo-drawing-officerichtextsegment)

[OfficeRichTextLine.cs:34](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeRichTextLine.cs#L34)

Creates a line with renderer-resolved height and no horizontal offset.

Parameters

**segments System.Collections.Generic.IReadOnlyList<OfficeIMO.Drawing.OfficeRichTextSegment> required**

`public OfficeRichTextLine(IReadOnlyList<OfficeRichTextSegment> segments, double lineHeight = 0, double offsetX = 0)` [#](#constructor-ctor-collections-generic-ireadonlylist-officeimo-drawing-officerichtextsegment-double-double)

[OfficeRichTextLine.cs:19](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeRichTextLine.cs#L19)

Creates a measured rich text line.

Parameters

**segments System.Collections.Generic.IReadOnlyList<OfficeIMO.Drawing.OfficeRichTextSegment> required**

Measured segments on the line.

**lineHeight double = 0 optional**

Optional resolved height for this line. A value of zero lets block renderers fall back to the containing layout line height.

**offsetX double = 0 optional**

Additional x offset relative to the text frame. Negative offsets retain aligned text that extends beyond its left edge.

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

## Properties

`public IReadOnlyList<OfficeRichTextSegment> Segments { get; }` [#](#property-segments)

[OfficeRichTextLine.cs:61](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeRichTextLine.cs#L61)

Gets measured rich text segments on the line.

`public double Width { get; }` [#](#property-width)

[OfficeRichTextLine.cs:66](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeRichTextLine.cs#L66)

Gets the total measured line width.

`public double FontSize { get; }` [#](#property-fontsize)

[OfficeRichTextLine.cs:71](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeRichTextLine.cs#L71)

Gets the largest font size used by this line.

`public double LineHeight { get; }` [#](#property-lineheight)

[OfficeRichTextLine.cs:76](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeRichTextLine.cs#L76)

Gets the resolved line height for this line, or zero when the containing block line height should be used.

`public double OffsetX { get; }` [#](#property-offsetx)

[OfficeRichTextLine.cs:81](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeRichTextLine.cs#L81)

Gets the additional x offset relative to the text frame, including negative offsets for aligned overflow.

<!-- PowerForge markdown artifact sha256:EEE25E8517AA38629B3C1BA6BDD81305C00DDF423B6C5A3EB687110CDB66C291 -->
