Csharp/C#教程:C#中GraphicsPath的Flatten方法用法实例分享

本文实例讲述了C#中GraphicsPath的Flatten方法。分享给大家供大家参考。具体实现方法如下:

usingSystem; usingSystem.Collections.Generic; usingSystem.ComponentModel; usingSystem.Data; usingSystem.Drawing; usingSystem.Text; usingSystem.Windows.Forms; usingSystem.Drawing.Drawing2D; namespaceadvanced_drawing { publicpartialclassForm11:Form { publicForm11() { InitializeComponent(); } privatevoidForm11_Paint(objectsender,PaintEventArgse) { Matrixmatrix=newMatrix(); matrix.Translate(10,10); GraphicsPathpath=newGraphicsPath(); path.Transform(matrix); Rectanglerect=newRectangle(0,0,100,100); Graphicsg=e.Graphics; path.AddRectangle(rect); g.DrawPath(Pens.Black,path); path.Flatten(matrix,10); g.DrawPath(Pens.Red,path); } } }

希望本文所述对大家的C#程序设计有所帮助。

您可能感兴趣的文章:C#实现WindowsForm调用R进行绘图与显示的方法C#打印绘图的实现方法C#GDI在控件上绘图的方法混合语言编程—C#使用原生的Directx和OpenGL绘图的方法深入c#GDI+简单绘图的具体操作步骤(四)深入c#GDI+简单绘图的具体操作步骤(三)深入c#GDI+简单绘图的具体操作步骤(二)深入c#GDI+简单绘图的具体操作步骤(一)C#中GraphicsPath的AddString方法用法实例C#中GraphicsPath的Warp方法用法实例C#中GraphicsPath的Widen方法用法实例C#实现动态数据绘图graphic的方法示例

标签: att ics 方法 ten te

C++小知识:大于0并不意味着等于1

C语言实现学生成绩管理系统实战教学

上述就是C#学习教程:C#中GraphicsPath的Flatten方法用法实例分享的全部内容,如果对大家有所用处且需要了解更多关于C#学习教程,希望大家多多关注—计算机技术网(www.ctvol.com)!

本文来自网络收集,不代表计算机技术网立场,如涉及侵权请联系管理员删除。

ctvol管理联系方式QQ:251552304

本文章地址:https://www.ctvol.com/cdevelopment/907289.html

(0)
上一篇 2021年10月24日
下一篇 2021年10月24日

精彩推荐