System.Drawing.Crush来自System.Drawing.Color
我正在为我们公司开发WinForm Printing应用程序。
打印文档时,我需要获取文档上每个Control的System.Drawing.Color
属性,并创建一个System.Drawing.Brush
对象来绘制它。
有没有办法将System.Drawing.Color
值转换为System.Drawing.Brush
值?
注意:我已经尝试查看System.Windows.Media.SolidColorBrush()
方法,但它似乎没有帮助。
使用SolidBrush类:
using (SolidBrush brush = new SolidBrush(yourColor)) { // ... }
为什么不用GDI +刷?
http://msdn.microsoft.com/en-us/library/system.drawing.solidbrush.solidbrush.aspx
另一个是WPF。