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

首頁 > 編程 > C# > 正文

C#畫筆Pen保存和恢復(fù)圖形對象的設(shè)置方法

2020-01-24 01:45:15
字體:
供稿:網(wǎng)友

本文實例講述了C#畫筆Pen保存和恢復(fù)圖形對象的設(shè)置方法。分享給大家供大家參考。具體如下:

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) };      GraphicsState old = g5.Save();      g5.SmoothingMode = SmoothingMode.AntiAlias;      g5.Restore(old);      g5.DrawCurve(pen5,p);    }  }}

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

發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 双城市| 麻栗坡县| 梓潼县| 昌都县| 米脂县| 阿合奇县| 临安市| 西峡县| 额敏县| 融水| 绥棱县| 密山市| 茂名市| 小金县| 周至县| 景泰县| 乳源| 方山县| 临洮县| 阿克苏市| 页游| 长武县| 册亨县| 贵阳市| 尼木县| 柳林县| 云安县| 温州市| 博白县| 连山| 盐源县| 新龙县| 大庆市| 永春县| 乌鲁木齐县| 丰城市| 柳州市| 新源县| 石台县| 张北县| 南皮县|