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

首頁(yè) > 編程 > C# > 正文

C#中GraphicsPath的Widen方法用法實(shí)例

2020-01-24 01:44:26
字體:
來(lái)源:轉(zhuǎn)載
供稿:網(wǎng)友

本文實(shí)例講述了C#中GraphicsPath的Widen方法用法。分享給大家供大家參考。具體如下:

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 advanced_drawing{  public partial class Form12 : Form  {    public Form12()    {      InitializeComponent();    }    private void Form12_Paint(object sender, PaintEventArgs e)    {      // Create a path and add two ellipses.      GraphicsPath myPath = new GraphicsPath();      myPath.AddEllipse(0, 0, 100, 100);      myPath.AddEllipse(100, 0, 100, 100);      // Draw the original ellipses to the screen in black.      e.Graphics.DrawPath(Pens.Blue, myPath);      // Widen the path.      Pen widenPen = new Pen(Color.Black, 10);      Matrix widenMatrix = new Matrix();      widenMatrix.Translate(50, 50);      myPath.Widen(widenPen, widenMatrix, 1.0f);      // Draw the widened path to the screen in red.      e.Graphics.FillPath(new SolidBrush(Color.Red), myPath);    }  }}

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

發(fā)表評(píng)論 共有條評(píng)論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 安康市| 巴楚县| 克拉玛依市| 泾川县| 哈巴河县| 建平县| 五河县| 廉江市| 交口县| 南投县| 会东县| 寻乌县| 元氏县| 城步| 抚顺县| 文安县| 广州市| 呼伦贝尔市| 石屏县| 沐川县| 来安县| 全州县| 海阳市| 裕民县| 天峻县| 且末县| 礼泉县| 古田县| 利川市| 大冶市| 蚌埠市| 陕西省| 盐池县| 卢湾区| 天台县| 惠水县| 尼勒克县| 锡林浩特市| 铁岭市| 阿坝县| 遂川县|