C#中GraphicsPath的Flatten方法用法實例
更新時間:2015年06月12日 12:33:52 作者:zhuzhao
這篇文章主要介紹了C#中GraphicsPath的Flatten方法,實例分析了Flatten方法的相關使用技巧,需要的朋友可以參考下
本文實例講述了C#中GraphicsPath的Flatten方法。分享給大家供大家參考。具體實現(xiàn)方法如下:
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 advanced_drawing { public partial class Form11 : Form { public Form11() { InitializeComponent(); } private void Form11_Paint(object sender, PaintEventArgs e) { Matrix matrix=new Matrix(); matrix.Translate(10, 10); GraphicsPath path = new GraphicsPath(); path.Transform(matrix); Rectangle rect = new Rectangle(0, 0, 100, 100); Graphics g = e.Graphics; path.AddRectangle(rect); g.DrawPath(Pens.Black, path); path.Flatten(matrix, 10); g.DrawPath(Pens.Red, path); } } }
希望本文所述對大家的C#程序設計有所幫助。
您可能感興趣的文章:
- C#實現(xiàn)Windows Form調(diào)用R進行繪圖與顯示的方法
- C#打印繪圖的實現(xiàn)方法
- C# GDI在控件上繪圖的方法
- 混合語言編程—C#使用原生的Directx和OpenGL繪圖的方法
- 深入c# GDI+簡單繪圖的具體操作步驟(四)
- 深入c# GDI+簡單繪圖的具體操作步驟(三)
- 深入c# GDI+簡單繪圖的具體操作步驟(二)
- 深入c# GDI+簡單繪圖的具體操作步驟(一)
- C#中GraphicsPath的AddString方法用法實例
- C#中GraphicsPath的Warp方法用法實例
- C#中GraphicsPath的Widen方法用法實例
- C#實現(xiàn)動態(tài)數(shù)據(jù)繪圖graphic的方法示例
相關文章
C#?BitArray(點矩陣)轉(zhuǎn)換成int和string的方法實現(xiàn)
BitArray?類管理一個緊湊型的位值數(shù)組,它使用布爾值來表示,本文主要介紹了C#?BitArray(點矩陣)轉(zhuǎn)換成int和string的方法實現(xiàn),具有一定的參考價值,感興趣的可以了解一下2022-05-05