# OfficeTextLine

Represents one measured line produced by the shared dependency-free text layout helper.

Struct 

`OfficeIMO.Drawing`

**Namespace**

`OfficeIMO.Drawing`

**Assembly**

`OfficeIMO.Core`

**Source revision**

`ba882f6b0d07` with working tree changes

**Source**

[OfficeTextLine.cs:14](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeTextLine.cs#L14)

**Base**

`ValueType`

**Modifiers**

sealed

Represents one measured line produced by the shared dependency-free text layout helper.

## Inheritance

- ValueType
- OfficeTextLine

## Usage

Explore 8 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 5

- Property [OfficeTextBlockLayout.Lines](/api/core/officeimo-drawing-officetextblocklayout/#property-lines)
- Method [OfficeTextLayoutEngine.MeasureUnwrappedLines](/api/core/officeimo-drawing-officetextlayoutengine/#method-measureunwrappedlines-string-double-func-system-string-system-double-system-double)
- Method [OfficeTextLayoutEngine.TrimLineStartToWidth](/api/core/officeimo-drawing-officetextlayoutengine/#method-trimlinestarttowidth-string-double-double-func-system-string-system-double-system-double-boolean)
- Method [OfficeTextLayoutEngine.TrimLineToWidth](/api/core/officeimo-drawing-officetextlayoutengine/#method-trimlinetowidth-string-double-double-func-system-string-system-double-system-double-boolean)
- Method [OfficeTextLayoutEngine.WrapLines](/api/core/officeimo-drawing-officetextlayoutengine/#method-wraplines-string-double-double-func-system-string-system-double-system-double-nullable-officeimo-drawing-officetextparagraphindent)

### Accepted by parameters 3

- Constructor [OfficeTextBlockLayout.OfficeTextBlockLayout](/api/core/officeimo-drawing-officetextblocklayout/#constructor-ctor-collections-generic-ireadonlylist-officeimo-drawing-officetextline-double-double-double-double-boolean) parameter `lines`
- Method [OfficeTextLayoutEngine.ClipTextBlockToHeight](/api/core/officeimo-drawing-officetextlayoutengine/#method-cliptextblocktoheight-collections-generic-ireadonlylist-officeimo-drawing-officetextline-double-double-double-double-func-system-string-system-double-system-double-boolean) parameter `lines`
- Method [OfficeTextLayoutEngine.MeasureMaxLineWidth](/api/core/officeimo-drawing-officetextlayoutengine/#method-measuremaxlinewidth-collections-generic-ireadonlylist-officeimo-drawing-officetextline) parameter `lines`

Filter members 

Show inherited

## Constructors

`public OfficeTextLine(string text, double width, double offsetX = 0)` [#](#constructor-ctor-string-double-double)

[OfficeTextLine.cs:14](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeTextLine.cs#L14)

Creates a measured text line.

Parameters

**text string required**

Line text.

**width double required**

Measured line width in the same coordinate space as the caller's font size.

**offsetX double = 0 optional**

Additional x offset applied to this line inside the text frame.

## Inherited Methods

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

Inherited from ValueType

Parameters

**obj object? required**

Returns

`bool`

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

Inherited from ValueType

Returns

`int`

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

Inherited from object

Returns

`Type`

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

Inherited from ValueType

Returns

`string?`

## Properties

`public string Text { get; }` [#](#property-text)

[OfficeTextLine.cs:20](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeTextLine.cs#L20)

Line text.

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

[OfficeTextLine.cs:23](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeTextLine.cs#L23)

Measured line width.

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

[OfficeTextLine.cs:26](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeTextLine.cs#L26)

Additional x offset applied to this line inside the text frame.

<!-- PowerForge markdown artifact sha256:3EDDA9AB3006C4E3D86B28547273DAA4F9184D3892C8447CF17355AE09CB39EB -->
