📄 pathglyph.cs
字号:
using System;
using System.Drawing;
using System.Drawing.Drawing2D;
using PdfSharp.Drawing;
namespace XDrawing.TestLab.Tester
{
/// <summary>
/// Demonstrates the use of XGraphics.DrawPath.
/// </summary>
public class PathGlyph : TesterBase
{
public override void RenderPage(XGraphics gfx)
{
base.RenderPage(gfx);
#if true
XPen pen = new XPen(XColors.DarkGreen, 20);
gfx.DrawLine(pen, 0, 0, 1000, 1000);
#endif
XGraphicsPath path = new XGraphicsPath();
path.AddString("@", new XFontFamily("Times"), XFontStyle.BoldItalic, 500, new XPoint(90, 60), XStringFormat.Default);
gfx.DrawPath(properties.Pen2.Pen, properties.Brush2.Brush, path);
}
public override string Description
{
get { return "AddString & DrawPath"; }
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -