/// <summary>
        /// Fill a marquee mask with a marquee-tool.
        /// </summary>
        /// <param name="drawingSession"> The drawing-session. </param>
        /// <param name="resourceCreator"> The resource-creator. </param>
        /// <param name="toolType"> The marquee-tool type. </param>
        /// <param name="marqueeTool"> The marquee-tool. </param>
        /// <param name="sourceRectangle"> The source rectangle. </param>
        /// <param name="compositeMode"> The composite mode. </param>
        public static void FillMarqueeMaskl(this CanvasDrawingSession drawingSession, ICanvasResourceCreator resourceCreator, MarqueeToolType toolType, MarqueeTool marqueeTool, Rect sourceRectangle, MarqueeCompositeMode compositeMode)
        {
            switch (toolType)
            {
            case MarqueeToolType.Rectangular:
                drawingSession.DrawMarqueeToolRectangular(resourceCreator, marqueeTool.TransformerRect, sourceRectangle, compositeMode);
                break;

            case MarqueeToolType.Elliptical:
                drawingSession.DrawMarqueeToolEllipse(resourceCreator, marqueeTool.TransformerRect, sourceRectangle, compositeMode);
                break;

            case MarqueeToolType.Polygonal:
            case MarqueeToolType.FreeHand:
                Vector2[]      points         = marqueeTool.Points.ToArray();
                CanvasGeometry canvasGeometry = CanvasGeometry.CreatePolygon(resourceCreator, marqueeTool.Points.ToArray());
                drawingSession.DrawMarqueeToolGeometry(resourceCreator, canvasGeometry, sourceRectangle, compositeMode);
                break;
            }
        }