开发者

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);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜