Click or drag to resize
CanvasDrawingSessionFillRectangle Method (Rect, ICanvasBrush, ICanvasBrush)
Fills the interior of a rectangle, using a brush to define the color and a second brush to specify an opacity mask.

Namespace:  Microsoft.Graphics.Canvas
Assembly:  Microsoft.Graphics.Canvas (in Microsoft.Graphics.Canvas.dll) Version:

Transparent portions of the opacity mask brush indicate the areas where the contents of the rectangle will be transparent, while opaque portions of the mask indicate where the rectangle is visible. The RGB color of the opacity mask is ignored.

For more flexible opacity mask options, see the CreateLayer Overload and CanvasActiveLayer.

Optimization note - this method is fastest when all the following requirements are satisfied:

The opacity mask brush is allowed to be null.

See Also