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
精彩评论