国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > C# > 正文

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

2020-01-24 01:44:31
字體:
供稿:網(wǎng)友

本文實(shí)例講述了C#實(shí)現(xiàn)圖形路徑變換的方法。分享給大家供大家參考。具體實(shí)現(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);    }  }}

希望本文所述對(duì)大家的C#程序設(shè)計(jì)有所幫助。

發(fā)表評(píng)論 共有條評(píng)論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 临湘市| 东阳市| 马公市| 蛟河市| 长汀县| 内丘县| 伊川县| 普格县| 松江区| 田林县| 自贡市| 华阴市| 青海省| 宜章县| 保康县| 公安县| 兰考县| 武强县| 博湖县| 巴中市| 绥芬河市| 齐齐哈尔市| 新昌县| 镶黄旗| 山丹县| 梅州市| 延寿县| 恩平市| 易门县| 望奎县| 九江县| 名山县| 洛川县| 天全县| 永安市| 鞍山市| 贺州市| 靖远县| 江津市| 门源| 黄石市|