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

首頁 > 編程 > C# > 正文

C#紋理畫刷TextureBrush用法實例

2020-01-24 01:45:40
字體:
來源:轉載
供稿:網友

本文實例講述了C#紋理畫刷TextureBrush用法。分享給大家供大家參考。具體如下:

using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Drawing.Drawing2D;using System.Text;using System.Windows.Forms;namespace WindowsApplication2{  public partial class Form6 : Form  {    public Form6()    {      InitializeComponent();    }    private void Form6_Load(object sender, EventArgs e)    {    }    private void button1_Click(object sender, EventArgs e)    {      try      {        Bitmap image1 = (Bitmap)Image.FromFile(@"E:/ico/Administrator.bmp", true);        TextureBrush texture = new TextureBrush(image1);        texture.WrapMode = System.Drawing.Drawing2D.WrapMode.TileFlipX;        Graphics formGraphics = this.CreateGraphics();        formGraphics.FillEllipse(texture, new RectangleF(90.0F, 110.0F, 100, 100));        formGraphics.Dispose();      }      catch (System.IO.FileNotFoundException)      {        MessageBox.Show("There was an error opening the bitmap." + "Please check the path.");      }    }  }}

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

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 冀州市| 滦南县| 抚顺市| 北海市| 天峨县| 汉中市| 云和县| 涡阳县| 兴化市| 新平| 稻城县| 东方市| 皋兰县| 东台市| 施甸县| 甘泉县| 西丰县| 莎车县| 新建县| 彭阳县| 台南县| 萍乡市| 惠州市| 蒲江县| 阳城县| 河池市| 个旧市| 朝阳市| 永修县| 望奎县| 肃南| 简阳市| 沈阳市| 株洲市| 通道| 石棉县| 抚州市| 雅安市| 梅河口市| 无锡市| 台湾省|