# OfficeTextBlockLayout

Represents a measured multi-line text block produced by the shared text layout engine.

Class 

`OfficeIMO.Drawing`

**Namespace**

`OfficeIMO.Drawing`

**Assembly**

`OfficeIMO.Core`

**Source revision**

`ba882f6b0d07` with working tree changes

**Source**

[OfficeTextBlockLayout.cs:16](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeTextBlockLayout.cs#L16)

**Modifiers**

sealed

Represents a measured multi-line text block produced by the shared text layout engine.

## Inheritance

- object
- OfficeTextBlockLayout

## Usage

Explore 12 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 6

- Method [OfficeRasterText.Measure](/api/core/officeimo-drawing-officerastertext/#method-measure-string-double-string-nullable-system-double-threading-cancellationtoken)
- Property [OfficeTextBlockRenderPlan.Layout](/api/core/officeimo-drawing-officetextblockrenderplan/#property-layout)
- 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)
- Method [OfficeTextLayoutEngine.FitWrappedText](/api/core/officeimo-drawing-officetextlayoutengine/#method-fitwrappedtext-string-double-double-double-double-double-func-system-string-system-double-system-double-nullable-officeimo-drawing-officetextparagraphindent)
- Method [OfficeTextLayoutEngine.LayoutStackedTextBlock](/api/core/officeimo-drawing-officetextlayoutengine/#method-layoutstackedtextblock-string-double-double-double-double-double-func-system-string-system-double-system-double-boolean)
- Method [OfficeTextLayoutEngine.LayoutTextBlock](/api/core/officeimo-drawing-officetextlayoutengine/#method-layouttextblock-string-double-double-double-double-double-func-system-string-system-double-system-double-boolean-boolean-boolean-nullable-officeimo-drawing-officetextparagraphindent)

### Accepted by parameters 6

- Method [OfficeTextBlockRenderer.AppendSvgStyledTextBlock](/api/core/officeimo-drawing-officetextblockrenderer/#method-appendsvgstyledtextblock-text-stringbuilder-officeimo-drawing-officetextblocklayout-double-double-double-double-officeimo-officecolor-string-officeimo-drawing-officetextalignment-officeimo-drawing-officetextverticalalignment-boolean-boolean-boolean-double-double-double-boolean-boolean-officeimo-drawing-officetextdecorationstyle-officeimo-drawing-officetextdecorationstyle-officeimo-drawing-officetextbaseline-nullable-officeimo-officecolor) parameter `layout`
- Method [OfficeTextBlockRenderer.AppendSvgTextBlock](/api/core/officeimo-drawing-officetextblockrenderer/#method-appendsvgtextblock-text-stringbuilder-officeimo-drawing-officetextblocklayout-double-double-double-double-officeimo-officecolor-string-officeimo-drawing-officetextalignment-officeimo-drawing-officetextverticalalignment-boolean-boolean-boolean-double-double-double-boolean-boolean) parameter `layout`
- Method [OfficeTextBlockRenderer.DrawRasterTextBlock](/api/core/officeimo-drawing-officetextblockrenderer/#method-drawrastertextblock-officeimo-drawing-officerastercanvas-officeimo-drawing-officetextblocklayout-double-double-double-double-officeimo-officecolor-officeimo-drawing-officetextalignment-officeimo-drawing-officetextverticalalignment-boolean-boolean-boolean-double-double-double-boolean-double-boolean-string-boolean-boolean) parameter `layout`
- Method [OfficeTextBlockRenderer.WriteSvgTextBlock](/api/core/officeimo-drawing-officetextblockrenderer/#method-writesvgtextblock-xml-xmlwriter-officeimo-drawing-officetextblocklayout-double-double-double-double-officeimo-officecolor-string-officeimo-drawing-officetextalignment-officeimo-drawing-officetextverticalalignment-boolean-boolean-boolean-double-double-double-string-action-system-xml-xmlwriter-boolean) parameter `layout`
- Method [OfficeTextBlockRenderPlan.CreateFromCenter](/api/core/officeimo-drawing-officetextblockrenderplan/#method-createfromcenter-officeimo-drawing-officetextblocklayout-double-double-double-double-officeimo-drawing-officetextalignment-officeimo-drawing-officetextverticalalignment) parameter `layout`
- Method [OfficeTextBlockRenderPlan.CreateFromRectangle](/api/core/officeimo-drawing-officetextblockrenderplan/#method-createfromrectangle-officeimo-drawing-officetextblocklayout-double-double-double-double-officeimo-drawing-officetextalignment-officeimo-drawing-officetextverticalalignment) parameter `layout`

Filter members 

Show inherited

## Constructors

`public OfficeTextBlockLayout(IReadOnlyList<OfficeTextLine> lines, double fontSize, double lineHeight, double width, double height, bool clipped = false)` [#](#constructor-ctor-collections-generic-ireadonlylist-officeimo-drawing-officetextline-double-double-double-double-boolean)

[OfficeTextBlockLayout.cs:16](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeTextBlockLayout.cs#L16)

Creates a measured text block.

Parameters

**lines System.Collections.Generic.IReadOnlyList<OfficeIMO.Drawing.OfficeTextLine> required**

Measured text lines.

**fontSize double required**

Resolved font size used for measurement.

**lineHeight double required**

Resolved line height.

**width double required**

Measured block width.

**height double required**

Measured block height.

**clipped bool = false optional**

Whether the block was clipped or ellipsized to fit a requested bound.

## 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<OfficeTextLine> Lines { get; }` [#](#property-lines)

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

Measured text lines.

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

[OfficeTextBlockLayout.cs:29](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeTextBlockLayout.cs#L29)

Resolved font size used for measurement.

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

[OfficeTextBlockLayout.cs:32](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeTextBlockLayout.cs#L32)

Resolved line height.

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

[OfficeTextBlockLayout.cs:35](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeTextBlockLayout.cs#L35)

Measured block width.

`public double Height { get; }` [#](#property-height)

[OfficeTextBlockLayout.cs:38](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeTextBlockLayout.cs#L38)

Measured block height.

`public bool Clipped { get; }` [#](#property-clipped)

[OfficeTextBlockLayout.cs:41](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeTextBlockLayout.cs#L41)

Whether the block was clipped or ellipsized to fit a requested bound.

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