Click or drag to resize
CanvasSvgPathAttribute Class
[Win10_15063] Object describing SVG path data.
Inheritance Hierarchy

Namespace:  Microsoft.Graphics.Canvas.Svg
Assembly:  Microsoft.Graphics.Canvas (in Microsoft.Graphics.Canvas.dll) Version:
public sealed class CanvasSvgPathAttribute : IDisposable, 

The CanvasSvgPathAttribute type exposes the following members.

Public propertyCommands
[Win10_15063] Gets the array of commands.
Public propertyDevice
[Win10_15063] Gets the device with which this attribute is associated.
Public propertySegmentData
[Win10_15063] Gets the array of segment data.
Public methodClone
[Win10_15063] Creates a clone of this attribute value.
Public methodCreatePathGeometry
[Win10_15063] Creates a path geometry object representing the path data.
Public methodCreatePathGeometry(CanvasFilledRegionDetermination)
[Win10_15063] Creates a path geometry object representing the path data, using the specified CanvasFilledRegionDetermination.
Public methodDispose
[Win10_15063] Releases all resources used by the CanvasSvgPathAttribute.
Public methodGetCommands
[Win10_15063] Gets commands from the commands array.
Public methodGetElement
[Win10_15063] Returns the element on which this attribute is set.
Public methodGetSegmentData
[Win10_15063] Gets data from the segment data array.
Public methodRemoveCommandsAtEnd
[Win10_15063] Removes commands from the end of the commands array.
Public methodRemoveSegmentDataAtEnd
[Win10_15063] Removes data from the end of the segment data array.
Public methodSetCommands
[Win10_15063] Sets new commands to the commands array.
Public methodSetSegmentData
[Win10_15063] Sets new commands to the segment data array.

This API is only available when running on Windows 10 build 15063 (Creators Update) or greater.

Path data can be set as the 'd' attribute on a 'path' element.

The path data set is organized into two arrays:

    • The segment data array stores all numbers, and
    • the commands array stores the set of commands.
  • Unlike the string data set in the d attribute, each command in this representation uses a fixed number of elements in the segment data array. Therefore, the path 'M 0,0 100,0 0,100 Z' is represented as: 'M0,0 L100,0 L0,100 Z'. This is split into two arrays, with the segment data containing '0,0 100,0 0,100', and the commands containing 'M L L Z'.

    See Also