亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

C#實現(xiàn)圖形路徑變換的方法

 更新時間:2015年06月12日 12:29:10   作者:zhuzhao  
這篇文章主要介紹了C#實現(xiàn)圖形路徑變換的方法,涉及C#針對圖形路徑的相關操作技巧,需要的朋友可以參考下

本文實例講述了C#實現(xiàn)圖形路徑變換的方法。分享給大家供大家參考。具體實現(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 Form10 : Form
  {
    public Form10()
    {
      InitializeComponent();
    }
    GraphicsPath CreateLabeledRectPath(string label)
    {
      GraphicsPath path = new GraphicsPath();
      Rectangle rect = new Rectangle(0, 0, 200, 200);
      FontFamily fontFamily=new FontFamily("Arial");
      path.AddString(label, fontFamily, 20, 20f, new Point(0, 0), new StringFormat());
      return path;
    }
    private void Form10_Paint(object sender, PaintEventArgs e)
    {
      Graphics g = e.Graphics;
      GraphicsPath path = CreateLabeledRectPath("zhuzhao");
      g.DrawPath(Pens.Red, path);
      Matrix matrix = new Matrix();
      matrix.Translate(150, 150);
      path.Transform(matrix);
      g.DrawPath(Pens.Black, path);
    }
  }
}

希望本文所述對大家的C#程序設計有所幫助。

相關文章

最新評論