# OfficeMathRenderer

Renders the shared mathematical expression tree into the shared drawing scene.

Class 

`OfficeIMO.Drawing`

**Namespace**

`OfficeIMO.Drawing`

**Assembly**

`OfficeIMO.Core`

**Source revision**

`ba882f6b0d07` with working tree changes

**Source**

[OfficeMathRenderer.cs:25](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Math/OfficeMathRenderer.cs#L25)

**Modifiers**

static

Renders the shared mathematical expression tree into the shared drawing scene.

## Inheritance

- object
- OfficeMathRenderer

Filter members 

Show inherited

## Methods

AddToDrawing 2 overloads

`public static OfficeMathLayoutMetrics AddToDrawing(OfficeDrawing drawing, OfficeMathExpression expression, double x, double y, OfficeMathRenderOptions? options = null)` [#](#method-addtodrawing-officeimo-drawing-officedrawing-officeimo-drawing-officemathexpression-double-double-officeimo-drawing-officemathrenderoptions)

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

Adds a laid-out expression to an existing drawing.

Parameters

**drawing OfficeIMO.Drawing.OfficeDrawing required**

**expression OfficeIMO.Drawing.OfficeMathExpression required**

**x double required**

**y double required**

**options OfficeIMO.Drawing.OfficeMathRenderOptions? = null optional**

Returns

`OfficeMathLayoutMetrics`

`public static OfficeMathLayoutMetrics AddToDrawing(OfficeDrawing drawing, OfficeMathExpression expression, double x, double y, OfficeMathRenderOptions? options, CancellationToken cancellationToken)` [#](#method-addtodrawing-officeimo-drawing-officedrawing-officeimo-drawing-officemathexpression-double-double-officeimo-drawing-officemathrenderoptions-threading-cancellationtoken)

[OfficeMathRenderer.cs:72](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Math/OfficeMathRenderer.cs#L72)

Adds an expression with cancellable bounded font-outline work.

Parameters

**drawing OfficeIMO.Drawing.OfficeDrawing required**

**expression OfficeIMO.Drawing.OfficeMathExpression required**

**x double required**

**y double required**

**options OfficeIMO.Drawing.OfficeMathRenderOptions? required**

**cancellationToken System.Threading.CancellationToken required**

Returns

`OfficeMathLayoutMetrics`

Measure 2 overloads

`public static OfficeMathLayoutMetrics Measure(OfficeMathExpression expression, OfficeMathRenderOptions? options = null)` [#](#method-measure-officeimo-drawing-officemathexpression-officeimo-drawing-officemathrenderoptions)

[OfficeMathRenderer.cs:25](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Math/OfficeMathRenderer.cs#L25)

Measures an expression using deterministic, dependency-free font metrics.

Parameters

**expression OfficeIMO.Drawing.OfficeMathExpression required**

**options OfficeIMO.Drawing.OfficeMathRenderOptions? = null optional**

Returns

`OfficeMathLayoutMetrics`

`public static OfficeMathLayoutMetrics Measure(OfficeMathExpression expression, OfficeMathRenderOptions? options, CancellationToken cancellationToken)` [#](#method-measure-officeimo-drawing-officemathexpression-officeimo-drawing-officemathrenderoptions-threading-cancellationtoken)

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

Measures an expression with cancellable bounded font-outline work.

Parameters

**expression OfficeIMO.Drawing.OfficeMathExpression required**

**options OfficeIMO.Drawing.OfficeMathRenderOptions? required**

**cancellationToken System.Threading.CancellationToken required**

Returns

`OfficeMathLayoutMetrics`

Render 2 overloads

`public static OfficeDrawing Render(OfficeMathExpression expression, OfficeMathRenderOptions? options = null)` [#](#method-render-officeimo-drawing-officemathexpression-officeimo-drawing-officemathrenderoptions)

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

Creates a tightly sized drawing containing an expression.

Parameters

**expression OfficeIMO.Drawing.OfficeMathExpression required**

**options OfficeIMO.Drawing.OfficeMathRenderOptions? = null optional**

Returns

`OfficeDrawing`

`public static OfficeDrawing Render(OfficeMathExpression expression, OfficeMathRenderOptions? options, CancellationToken cancellationToken)` [#](#method-render-officeimo-drawing-officemathexpression-officeimo-drawing-officemathrenderoptions-threading-cancellationtoken)

[OfficeMathRenderer.cs:42](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Math/OfficeMathRenderer.cs#L42)

Creates a drawing with cancellable bounded font-outline work.

Parameters

**expression OfficeIMO.Drawing.OfficeMathExpression required**

**options OfficeIMO.Drawing.OfficeMathRenderOptions? required**

**cancellationToken System.Threading.CancellationToken required**

Returns

`OfficeDrawing`

## 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?`

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