c#中GraphicsPath的Flatten方法
2008-12-19 14:08
330 查看
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);
}
}
}
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#中GraphicsPath的Flatten方法用法实例
- c#中GraphicsPath的Widen方法
- c#中GraphicsPath的Warp方法
- C#中GraphicsPath的Warp方法用法实例
- C#中GraphicsPath的Widen方法用法实例
- c#中GraphicsPath的AddString方法
- C#中GraphicsPath的AddString方法用法实例
- c#创建Graphics对象的三种方法
- c#创建Graphics对象的三种方法
- C# graphicspath 翻转
- c#创建Graphics对象的三种方法
- C#的path.GetFullPath 获取上级目录实现方法
- C# 获取两个矩形相减部分的GraphicsPath
- 【C#】52. 使用Flatten方法处理并行任务抛出的异常
- [C#]从URL中获取路径的最简单方法-new Uri(url).AbsolutePath
- [C#]从URL中获取路径的最简单方法-new Uri(url).AbsolutePath
- C#中的Path类的方法详解
- C# Graphics.FillEllipse 方法
- C# graphics方法
- C#CreateGraphics方法的三种实现方式