Wouldn't it be nice to apply a mask directly to a Canvas?
Currently the only way to mask a canvas is to create a Picture, apply the a mask to the picture and then use Canvas.Graphics.DrawPicture MyPicture, 0, 0.
While this works, it would be more convenient to have a mask applied directly to the Canvas. For instance, lets say for example you want to recreate the glowing OK button on OS X. You would need to mask each of your dozen or two pictures shape that you use to animate the glow in the rounded rectangle, rather than masking the canvas once.
Another example: Lets say you have an animated UI element that has a shadow that you create using a mask. You have to be careful to erase the full background or use Refresh when replacing one shadowed picture for the next because otherwise overlapping shadows start to multiply until you get black. (This is because drawing a masked picture into a canvas doesn't erase the background behind the masked areas which is proper behavior.) Erasing is viable but inefficient. It would be more efficient to have a nice shadow mask on the UI element and then flop pictures in and out of it.
Another example: you can't edit the canvas.graphics property directly and apply a mask. You need to offload your editing into an another masked picture and bring it in.
Another example: you want to change the mask on your canvas. It would be nice to be able to do this without knowledge of what is currently on the canvas and re-creating the contents.
Before I submit a feature request, am I going about this the wrong way? Am I missing something obvious? Is applying a mask to a picture and then applying the picture to the Canvas the normal and recommended route?
Thanks! _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives of this list here: <http://support.realsoftware.com/listarchives/lists.html>
