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

首頁 > 編程 > C# > 正文

C#使用Region對圖形區域構造和填充的方法

2020-01-24 01:44:22
字體:
來源:轉載
供稿:網友

本文實例講述了C#使用Region對圖形區域構造和填充的方法。分享給大家供大家參考。具體如下:

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 Form15 : Form  {    public Form15()    {      InitializeComponent();    }    private void Form15_Paint(object sender, PaintEventArgs e)    {      GraphicsPath myPath = new GraphicsPath();      string stringText = "zhuzhao";      FontFamily family = new FontFamily("Arial");      int fontStyle = (int)FontStyle.Italic;      int emSize = 26;      Point origin = new Point(20, 20);      StringFormat format = StringFormat.GenericDefault;      myPath.AddString(stringText,family,fontStyle,emSize,origin,format);      Region region = new Region(myPath);      e.Graphics.FillRegion(Brushes.Red, region);    }  }}

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

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 抚松县| 黔东| 哈巴河县| 保靖县| 宁强县| 贵定县| 松溪县| 长治市| 金阳县| 长葛市| 铁岭县| 恩平市| 林西县| 偏关县| 古田县| 怀集县| 阿鲁科尔沁旗| 海兴县| 冀州市| 庆城县| 元阳县| 张家界市| 长葛市| 阳城县| 都安| 许昌市| 崇文区| 始兴县| 谢通门县| 夏津县| 喀喇| 宁都县| 铜川市| 馆陶县| 高青县| 高密市| 莲花县| 原平市| 梓潼县| 章丘市| 怀柔区|