开发者

How to Fill Path with a Brush from an Image

开发者 https://www.devze.com 2023-02-22 04:23 出处:网络
I have a question about MFC. We have an API: Graphics::Fillpath(IN const Brush * brush, IN const GraphicsPath *path)

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

精彩评论

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