Click or drag to resize
CanvasGradientMeshCreateCoonsPatch Method
Creates a CanvasGradientMesh using Coons patch semantics.

Namespace:  Microsoft.Graphics.Canvas.Geometry
Assembly:  Microsoft.Graphics.Canvas (in Microsoft.Graphics.Canvas.dll) Version: 0.0.0.0
Syntax
C#
public static CanvasGradientMeshPatch CreateCoonsPatch(
	Vector2[] points,
	Vector4[] colors,
	CanvasGradientMeshPatchEdge[] edges
)

Parameters

points
Type: System.NumericsVector2
colors
Type: System.NumericsVector4
edges
Type: Microsoft.Graphics.Canvas.GeometryCanvasGradientMeshPatchEdge

Return Value

Type: CanvasGradientMeshPatch
Remarks

CreateCoonsPatch is a convenience method for creating a gradient mesh patch. Its semantics are a bit simpler than CreateTensorPatch, since it takes fewer input points (12 instead of 16).

CreateCoonsPatch requires that:

  • The size of the points array is 12.
  • The size of the colors array is 4.
  • The size of the edges array is 4.

The input point, color, and edge arrays are laid out as:

CanvasGradientMeshPatch.CreateCoonsPatch diagram
See Also