Click or drag to resize
CanvasGeometry.CreateInk Method (ICanvasResourceCreator, IEnumerable<InkStroke>, Matrix3x2, Single)
Creates a geometry from a collection of ink strokes.

Namespace:  Microsoft.Graphics.Canvas.Geometry
Assembly:  Microsoft.Graphics.Canvas (in Microsoft.Graphics.Canvas.dll) Version: 0.0.0.0
Syntax
C#
public static CanvasGeometry CreateInk(
	ICanvasResourceCreator resourceCreator,
	IEnumerable<InkStroke> inkStrokes,
	Matrix3x2 transform,
	float flatteningTolerance
)

Parameters

resourceCreator
Type: Microsoft.Graphics.Canvas.ICanvasResourceCreator
inkStrokes
Type: System.Collections.Generic.IEnumerable<InkStroke>
transform
Type: System.Numerics.Matrix3x2
flatteningTolerance
Type: System.Single

Return Value

Type: CanvasGeometry
Remarks

Uses the specified flattening tolerance and the specified transform on the input strokes.

Geometry created from ink typically contains many overlapping stroke segments and circles. After using CreateInk, it may be desirable to clean up these self-intersections by calling Outline.

Note that CanvasGeometry does not support pencil ink strokes (InkDrawingAttributesKind.Pencil). Passing pencil strokes will produce an empty geometry.

See Also