C#畫筆Pen用法實(shí)例
更新時間:2015年06月11日 15:12:25 作者:zhuzhao
這篇文章主要介紹了C#畫筆Pen用法,實(shí)例分析了畫筆Pen繪制圖形的相關(guān)技巧,需要的朋友可以參考下
本文實(shí)例講述了C#畫筆Pen用法。分享給大家供大家參考。具體如下:
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 WindowsApplication2 { public partial class Form11 : Form { public Form11() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { Pen pen = new Pen(Color.Blue, 12); pen.EndCap = LineCap.DiamondAnchor; Graphics g = this.CreateGraphics(); g.DrawLine(pen, 10, 50, 100, 50); } } }
希望本文所述對大家的C#程序設(shè)計有所幫助。
相關(guān)文章
c#中winform根據(jù)郵箱地址和密碼一鍵發(fā)送email的實(shí)現(xiàn)
本文主要介紹了c#winform根據(jù)郵箱地址和密碼一鍵發(fā)送email的實(shí)現(xiàn),文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧2022-07-07C#實(shí)現(xiàn)Stripe支付的方法實(shí)踐
本文主要介紹了C#實(shí)現(xiàn)Stripe支付的方法實(shí)踐,文中通過示例代碼介紹的非常詳細(xì),具有一定的參考價值,感興趣的小伙伴們可以參考一下2022-02-02詳解C# ConcurrentBag的實(shí)現(xiàn)原理
ConcurrentBag<T>實(shí)現(xiàn)了IProducerConsumerCollection<T>接口,該接口主要用于生產(chǎn)者消費(fèi)者模式下,可見該類基本就是為生產(chǎn)消費(fèi)者模式定制的。然后還實(shí)現(xiàn)了常規(guī)的IReadOnlyCollection<T>類,實(shí)現(xiàn)了該類就需要實(shí)現(xiàn)IEnumerable<T>、IEnumerable、 ICollection類2021-06-06