Draw shape to alpha channel only
I want to draw a shape to the alpha channel only of my image. I can use a colour matrix when drawing an 开发者_StackOverflow社区image with Graphics.DrawImage(..), as it has a parameter to pass in the ImageAttributes. Is it possible to do this with the FillEllipse method? Or would I have to draw it to a separate image, then use DrawImage to apply it to my main image?
Cheers, Dan.
You may try something like:
Graphics g;
g.CompositionMode = CompositingMode.SourceOver;
then fill with:
Color c = Color.FromArgb(100, Color.White);
精彩评论