最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

C#使用Region對(duì)圖形區(qū)域構(gòu)造和填充的方法

 更新時(shí)間:2015年06月12日 14:52:57   作者:zhuzhao  
這篇文章主要介紹了C#使用Region對(duì)圖形區(qū)域構(gòu)造和填充的方法,實(shí)例分析了Region類圖形操作的相關(guān)技巧,需要的朋友可以參考下

本文實(shí)例講述了C#使用Region對(duì)圖形區(qū)域構(gòu)造和填充的方法。分享給大家供大家參考。具體如下:

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);
    }
  }
}

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

相關(guān)文章

最新評(píng)論

双峰县| 汝城县| 南乐县| 万州区| 青冈县| 揭东县| 绥中县| 南投县| 垦利县| 杭锦后旗| 静海县| 台山市| 华坪县| 洪泽县| 资兴市| 余江县| 浙江省| 墨竹工卡县| 满洲里市| 克什克腾旗| 尉氏县| 清流县| 绥芬河市| 和田县| 榆中县| 谢通门县| 安龙县| 海南省| 抚州市| 克东县| 外汇| 灵武市| 修武县| 孝义市| 丹凤县| 阿城市| 蒲江县| 阿拉善左旗| 宁化县| 隆回县| 轮台县|