Click or drag to resize
CanvasGeometryCreatePolygon Method
Creates a new polygon geometry (triangle, quadrilateral, etc.), connecting the specified points.

Namespace:  Microsoft.Graphics.Canvas.Geometry
Assembly:  Microsoft.Graphics.Canvas (in Microsoft.Graphics.Canvas.dll) Version: 0.0.0.0
Syntax
C#
public static CanvasGeometry CreatePolygon(
	ICanvasResourceCreator resourceCreator,
	Vector2[] points
)

Parameters

resourceCreator
Type: Microsoft.Graphics.CanvasICanvasResourceCreator
points
Type: System.NumericsVector2

Return Value

Type: CanvasGeometry
Remarks

The polygon will automatically be closed by connecting the last point back to the first one.

Passing an empty set of points will produce an empty polygon.

The resource creator parameter can be null if the geometry will never be drawn onto a CanvasDevice.

See Also