开发者

How to Fill Path with a Brush from an Image

I have a question about MFC. We have an API:

Graphics::Fillpath(IN const Brush * brush, IN const GraphicsPath *path)

It means we will fill the path with the brush, ex: if path is a triangle, we could fill it will a #开发者_如何学编程FF0000 Brush color.

Thus, I want to have a way to make a brush from Image.


Use a Texture Brush Bitmap^ objBit .... get your image

TextureBrush^ pat = gcnew TextureBrush(objBit); g->FillPolygon(pat, pt); pt is your polygon array

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜