Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

OfficeInkStroke

OfficeIMO.Drawing

Namespace
OfficeIMO.Drawing
Assembly
OfficeIMO.Core
Source revision
ba882f6b0d07 with working tree changes
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

Accepted by parameters 3

Constructors

OfficeInkStroke 2 overloads
public OfficeInkStroke() #

Creates an empty stroke.

public OfficeInkStroke(IEnumerable<OfficeInkPoint> points) #

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) #

Adds a sampled point and returns this stroke.

Parameters

point OfficeIMO.Drawing.OfficeInkPoint required
public OfficeInkStroke AddPoint(double x, double y, double? pressure = null) #

Adds a sampled point and returns this stroke.

Parameters

x double required
y double required
pressure double? = null optional
public OfficeInkStroke Clone() #

Creates a detached copy of this stroke.

public OfficeInkBounds GetBounds() #

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

public ValueTuple<double, double> GetTransformedTipDimensions() #

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) #

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) #

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
public bool IsTransformedTipAxisAligned() #

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

Properties

public IReadOnlyList<OfficeInkPoint> Points { get; } #

Stroke samples in capture order.

public OfficeColor Color { get; set; } #

Base stroke color.

public double Width { get; set; } #

Nominal pen-tip width in canvas units.

public double Height { get; set; } #

Nominal pen-tip height in canvas units.

public double Opacity { get; set; } #

Additional stroke opacity from 0 through 1.

public OfficeInkTipShape TipShape { get; set; } #

Pen tip shape.

public OfficeInkBias Bias { get; set; } #

Handwriting/drawing interpretation bias.

public bool FitToCurve { get; set; } #

Whether a renderer should smooth the captured samples.

public bool IgnorePressure { get; set; } #

Whether pressure samples should be ignored.

public bool IsHighlighter { get; set; } #

Whether the stroke represents translucent highlighting.

public OfficeTransform? Transform { get; set; } #

Optional affine transform applied to captured samples.

public uint? LanguageId { get; set; } #

Optional handwriting language identifier.

public string? RecognizedText { get; set; } #

Best recognized text associated with the stroke.

public IList<string> RecognitionAlternatives { get; } #

Alternative handwriting-recognition candidates, best first.