CanvasGeometryCreateGroup Method (ICanvasResourceCreator, CanvasGeometry) |
Namespace: Microsoft.Graphics.Canvas.Geometry
public static CanvasGeometry CreateGroup( ICanvasResourceCreator resourceCreator, CanvasGeometry[] geometries )
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 determines how to fill intersecting geometries in the group using a default CanvasFilledRegionDetermination of Alternate.
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.