C#模式画刷HatchBrush用法实例
程序员文章站
2023-11-17 19:17:28
本文实例讲述了c#模式画刷hatchbrush用法。分享给大家供大家参考。具体如下:
using system;
using system.collection...
本文实例讲述了c#模式画刷hatchbrush用法。分享给大家供大家参考。具体如下:
using system; using system.collections.generic; using system.componentmodel; using system.data; using system.drawing; using system.text; using system.windows.forms; using system.drawing.drawing2d; namespace windowsapplication2 { public partial class form7 : form { public form7() { initializecomponent(); } private void button1_click(object sender, eventargs e) { try { hatchbrush hat = new hatchbrush(hatchstyle.divot, color.darkblue, color.white); graphics formgraphics = this.creategraphics(); formgraphics.fillrectangle(hat, new rectanglef(90.0f, 110.0f, 100, 100)); formgraphics.dispose(); } catch (system.io.filenotfoundexception) { messagebox.show("there was an error opening the bitmap." + "please check the path."); } } private void form7_load(object sender, eventargs e) { } } }
希望本文所述对大家的c#程序设计有所帮助。
上一篇: 运营微信公众平台服务号的三点心得
下一篇: C#多线程编程中的锁系统(三)