Click or drag to resize
CanvasGeometryCreateInk Method (ICanvasResourceCreator, IEnumerableInkStroke, 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.CanvasICanvasResourceCreator
inkStrokes
Type: System.Collections.GenericIEnumerableInkStroke
transform
Type: System.NumericsMatrix3x2
flatteningTolerance
Type: SystemSingle

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