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

首頁 > 編程 > C# > 正文

C#畫筆Pen繪制曲線的方法

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

本文實例講述了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)    {      LinearGradientBrush brush = new LinearGradientBrush(this.ClientRectangle, Color.Empty, Color.Empty, 100);      ColorBlend blend = new ColorBlend();      blend.Colors = new Color[] { Color.Red, Color.Green, Color.Blue };      blend.Positions = new float[] { 0, .5f, 1 };      brush.InterpolationColors = blend;      Pen pen5 = new Pen(brush);      Graphics g5 = this.CreateGraphics();      Point[] p = new Point[] { new Point(0, 0), new Point(100, 100), new Point(50, 100), new Point(200, 100) };      g5.DrawCurve(pen5,p);    }  }}

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

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 连云港市| 文登市| 灌云县| 贵定县| 永吉县| 桃源县| 营山县| 文化| 林芝县| 望奎县| 额敏县| 昌邑市| 张家港市| 五华县| 海丰县| 敖汉旗| 南皮县| 珠海市| 宁化县| 望谟县| 安平县| 石景山区| 东台市| 常德市| 荔浦县| 隆林| 温州市| 湄潭县| 扶风县| 沙雅县| 花莲市| 宁河县| 耿马| 新巴尔虎左旗| 行唐县| 文成县| 汉源县| 碌曲县| 肥东县| 磐石市| 墨脱县|