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

首頁 > 編程 > C# > 正文

C#中GraphicsPath的AddString方法用法實例

2020-01-24 01:44:22
字體:
來源:轉載
供稿:網友

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

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 Form14 : Form  {    public Form14()    {      InitializeComponent();    }    private void Form14_Paint(object sender, PaintEventArgs e)    {      // Create a GraphicsPath object.      GraphicsPath myPath = new GraphicsPath();      // Set up all the string parameters.      string stringText = "Sample Text";      FontFamily family = new FontFamily("Arial");      int fontStyle = (int)FontStyle.Italic;      int emSize = 26;      Point origin = new Point(20, 20);      StringFormat format = StringFormat.GenericDefault;      // Add the string to the path.      myPath.AddString(stringText,        family,        fontStyle,        emSize,        origin,        format);      //Draw the path to the screen.      e.Graphics.FillPath(Brushes.Black, myPath);    }  }}

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

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 山丹县| 巴青县| 睢宁县| 棋牌| 莒南县| 五家渠市| 嫩江县| 阿拉善左旗| 沙湾县| 侯马市| 溧水县| 兰西县| 潢川县| 静海县| 教育| 罗平县| 昭平县| 南陵县| 喀什市| 琼中| 上蔡县| 三台县| 平陆县| 壤塘县| 娄烦县| 临沂市| 盱眙县| 扶余县| 醴陵市| 贵定县| 台湾省| 民县| 广州市| 根河市| 天等县| 托克逊县| 鄂尔多斯市| 洛川县| 高尔夫| 清水县| 洛川县|