# OfficeInkStroke

A dependency-free, format-neutral ink stroke.

Class 

`OfficeIMO.Drawing`

**Namespace**

`OfficeIMO.Drawing`

**Assembly**

`OfficeIMO.Core`

**Source revision**

`ba882f6b0d07` with working tree changes

**Source**

[OfficeInkModel.cs:189](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Ink/OfficeInkModel.cs#L189)

**Modifiers**

sealed

A dependency-free, format-neutral ink stroke.

## Inheritance

- object
- OfficeInkStroke

## Usage

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

- Property [OfficeInkDocument.Strokes](/api/core/officeimo-drawing-officeinkdocument/#property-strokes)
- Method [OfficeInkStroke.AddPoint](/api/core/officeimo-drawing-officeinkstroke/#method-addpoint-officeimo-drawing-officeinkpoint)
- Method [OfficeInkStroke.Clone](/api/core/officeimo-drawing-officeinkstroke/#method-clone)

### Accepted by parameters 3

- Method [OfficeInkDocument.Add](/api/core/officeimo-drawing-officeinkdocument/#method-add-officeimo-drawing-officeinkstroke) parameter `stroke`
- Method [OfficeInkDocument.Remove](/api/core/officeimo-drawing-officeinkdocument/#method-remove-officeimo-drawing-officeinkstroke) parameter `stroke`
- Method [OfficeInkRenderer.GetEffectiveOpacity](/api/core/officeimo-drawing-officeinkrenderer/#method-geteffectiveopacity-officeimo-drawing-officeinkstroke-double) parameter `stroke`

Filter members 

Show inherited

## Constructors

OfficeInkStroke 2 overloads

`public OfficeInkStroke()` [#](#constructor-ctor)

[OfficeInkModel.cs:189](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Ink/OfficeInkModel.cs#L189)

Creates an empty stroke.

`public OfficeInkStroke(IEnumerable<OfficeInkPoint> points)` [#](#constructor-ctor-collections-generic-ienumerable-officeimo-drawing-officeinkpoint)

[OfficeInkModel.cs:198](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Ink/OfficeInkModel.cs#L198)

Creates a stroke from sampled points.

Parameters

**points System.Collections.Generic.IEnumerable<OfficeIMO.Drawing.OfficeInkPoint> required**

## Methods

AddPoint 2 overloads

`public OfficeInkStroke AddPoint(OfficeInkPoint point)` [#](#method-addpoint-officeimo-drawing-officeinkpoint)

[OfficeInkModel.cs:247](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Ink/OfficeInkModel.cs#L247)

Adds a sampled point and returns this stroke.

Parameters

**point OfficeIMO.Drawing.OfficeInkPoint required**

Returns

`OfficeInkStroke`

`public OfficeInkStroke AddPoint(double x, double y, double? pressure = null)` [#](#method-addpoint-double-double-nullable-system-double)

[OfficeInkModel.cs:253](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Ink/OfficeInkModel.cs#L253)

Adds a sampled point and returns this stroke.

Parameters

**x double required**

**y double required**

**pressure double? = null optional**

Returns

`OfficeInkStroke`

`public OfficeInkStroke Clone()` [#](#method-clone)

[OfficeInkModel.cs:349](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Ink/OfficeInkModel.cs#L349)

Creates a detached copy of this stroke.

Returns

`OfficeInkStroke`

`public OfficeInkBounds GetBounds()` [#](#method-getbounds)

[OfficeInkModel.cs:257](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Ink/OfficeInkModel.cs#L257)

Returns axis-aligned bounds including nominal pen-tip dimensions.

Returns

`OfficeInkBounds`

`public ValueTuple<double, double> GetTransformedTipDimensions()` [#](#method-gettransformedtipdimensions)

[OfficeInkModel.cs:282](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Ink/OfficeInkModel.cs#L282)

Returns the axis-aligned pen-tip width and height after applying the linear portion of the optional affine transform. Translation does not affect the returned dimensions. Elliptical and rectangular tips retain their distinct geometry.

Returns

`ValueTuple<double, double>`

`public double GetTransformedTipExtent(double axisX, double axisY)` [#](#method-gettransformedtipextent-double-double)

[OfficeInkModel.cs:318](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Ink/OfficeInkModel.cs#L318)

Returns the full transformed pen-tip extent projected onto a canvas-space axis. The axis does not need to be normalized. Translation does not affect the returned extent.

Parameters

**axisX double required**

**axisY double required**

Returns

`double`

`public OfficePoint GetTransformedTipSupport(double axisX, double axisY)` [#](#method-gettransformedtipsupport-double-double)

[OfficeInkModel.cs:329](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Ink/OfficeInkModel.cs#L329)

Returns the transformed pen-tip support offset from its center in a canvas-space direction. This is the reusable tangent point used to sweep affine elliptical and rectangular tips along a path.

Parameters

**axisX double required**

**axisY double required**

Returns

`OfficePoint`

`public bool IsTransformedTipAxisAligned()` [#](#method-istransformedtipaxisaligned)

[OfficeInkModel.cs:290](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Ink/OfficeInkModel.cs#L290)

Returns whether the transformed pen tip remains an axis-aligned, non-degenerate ellipse or rectangle. Formats that store only tip width and height can use this to reject affine geometry they cannot represent losslessly.

Returns

`bool`

## 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<OfficeInkPoint> Points { get; }` [#](#property-points)

[OfficeInkModel.cs:204](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Ink/OfficeInkModel.cs#L204)

Stroke samples in capture order.

`public OfficeColor Color { get; set; }` [#](#property-color)

[OfficeInkModel.cs:207](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Ink/OfficeInkModel.cs#L207)

Base stroke color.

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

[OfficeInkModel.cs:210](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Ink/OfficeInkModel.cs#L210)

Nominal pen-tip width in canvas units.

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

[OfficeInkModel.cs:213](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Ink/OfficeInkModel.cs#L213)

Nominal pen-tip height in canvas units.

`public double Opacity { get; set; }` [#](#property-opacity)

[OfficeInkModel.cs:216](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Ink/OfficeInkModel.cs#L216)

Additional stroke opacity from 0 through 1.

`public OfficeInkTipShape TipShape { get; set; }` [#](#property-tipshape)

[OfficeInkModel.cs:219](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Ink/OfficeInkModel.cs#L219)

Pen tip shape.

`public OfficeInkBias Bias { get; set; }` [#](#property-bias)

[OfficeInkModel.cs:222](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Ink/OfficeInkModel.cs#L222)

Handwriting/drawing interpretation bias.

`public bool FitToCurve { get; set; }` [#](#property-fittocurve)

[OfficeInkModel.cs:225](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Ink/OfficeInkModel.cs#L225)

Whether a renderer should smooth the captured samples.

`public bool IgnorePressure { get; set; }` [#](#property-ignorepressure)

[OfficeInkModel.cs:228](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Ink/OfficeInkModel.cs#L228)

Whether pressure samples should be ignored.

`public bool IsHighlighter { get; set; }` [#](#property-ishighlighter)

[OfficeInkModel.cs:231](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Ink/OfficeInkModel.cs#L231)

Whether the stroke represents translucent highlighting.

`public OfficeTransform? Transform { get; set; }` [#](#property-transform)

[OfficeInkModel.cs:234](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Ink/OfficeInkModel.cs#L234)

Optional affine transform applied to captured samples.

`public uint? LanguageId { get; set; }` [#](#property-languageid)

[OfficeInkModel.cs:237](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Ink/OfficeInkModel.cs#L237)

Optional handwriting language identifier.

`public string? RecognizedText { get; set; }` [#](#property-recognizedtext)

[OfficeInkModel.cs:240](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Ink/OfficeInkModel.cs#L240)

Best recognized text associated with the stroke.

`public IList<string> RecognitionAlternatives { get; }` [#](#property-recognitionalternatives)

[OfficeInkModel.cs:243](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Ink/OfficeInkModel.cs#L243)

Alternative handwriting-recognition candidates, best first.

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