C#紋理畫刷TextureBrush用法實(shí)例
更新時(shí)間:2015年06月11日 14:58:47 作者:zhuzhao
這篇文章主要介紹了C#紋理畫刷TextureBrush用法,實(shí)例分析了紋理畫刷TextureBrush的具體使用技巧,需要的朋友可以參考下
本文實(shí)例講述了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."); } } } }
希望本文所述對(duì)大家的C#程序設(shè)計(jì)有所幫助。
相關(guān)文章
C#逐行分元素讀取記事本數(shù)據(jù)并寫入數(shù)據(jù)庫(kù)的方法
這篇文章主要介紹了C#逐行分元素讀取記事本數(shù)據(jù)并寫入數(shù)據(jù)庫(kù)的方法,通過(guò)StreamReader類里的ReadLine()方法實(shí)現(xiàn)逐行讀取的功能,是非常實(shí)用的技巧,需要的朋友可以參考下2014-12-12C#實(shí)現(xiàn)手機(jī)拍照并且保存水印照片
這篇文章主要介紹了C#實(shí)現(xiàn)手機(jī)拍照并且保存水印照片的相關(guān)資料,非常不錯(cuò),具有參考借鑒價(jià)值,需要的朋友可以參考下2016-11-11Unity編輯器選擇器工具類Selection常用函數(shù)示例詳解
這篇文章主要為大家介紹了Unity編輯器選擇器工具類Selection常用函數(shù)示例詳解,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進(jìn)步,早日升職加薪2023-08-08C#?利用Autofac批量接口注入依賴的問(wèn)題小結(jié)
這篇文章主要介紹了C#?利用Autofac批量接口注入依賴的問(wèn)題,本文給大家介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或工作具有一定的參考借鑒價(jià)值,需要的朋友可以參考下2021-12-12C#SuperSocket的搭建并配置啟動(dòng)總結(jié)
在本篇文章里我們給大家總結(jié)了關(guān)于C#SuperSocket的搭建并配置啟動(dòng)的相關(guān)內(nèi)容,正在學(xué)習(xí)的朋友們跟著參考下。2019-05-05