Click or drag to resize
CanvasGeometryCreateGroup Method (ICanvasResourceCreator, CanvasGeometry, CanvasFilledRegionDetermination)
Returns a geometry containing the specified geometries, grouped together.

Namespace:  Microsoft.Graphics.Canvas.Geometry
Assembly:  Microsoft.Graphics.Canvas (in Microsoft.Graphics.Canvas.dll) Version: 0.0.0.0
Syntax
C#
public static CanvasGeometry CreateGroup(
	ICanvasResourceCreator resourceCreator,
	CanvasGeometry[] geometries,
	CanvasFilledRegionDetermination filledRegionDetermination
)

Parameters

resourceCreator
Type: Microsoft.Graphics.CanvasICanvasResourceCreator
geometries
Type: Microsoft.Graphics.Canvas.GeometryCanvasGeometry
filledRegionDetermination
Type: Microsoft.Graphics.Canvas.GeometryCanvasFilledRegionDetermination

Return Value

Type: CanvasGeometry
Remarks

This operation doesn't remove self-intersecting areas, like an Outline operation would. If the group contains six overlapping rectangles, then the result, when streamed out (using interop) will still contain the six rectangles.

However, areas of self-intersection do not contribute to overdraw, and this is one of the advantages of using grouped geometry. For example, if the six overlapping rectangles from above were filled individually with FillGeometry with a semitransparent black brush, the overlapping parts would be darker. If the rectangles were in a geometry group, the result would be of uniform color. The processing necessary to achieve this occurs at draw time.

This overload uses the specified CanvasFilledRegionDetermination to determine how to fill intersecting geometries in the group.

Passing an empty set of geometries to this method is allowed, and will produce a zero-sized geomtry group.

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

See Also