shapesclosedcurve.cs

来自「用C#實現能產生PDF格式文件的源碼」· CS 代码 · 共 35 行

CS
35
字号
using System;
using System.Drawing;
using System.Drawing.Drawing2D;
using PdfSharp.Drawing;

namespace XDrawing.TestLab.Tester
{
  public class ShapesClosedCurve : TesterBase
  {
    /// <summary>
    /// Demonstrates the use of XGraphics.DrawClosedCurve.
    /// </summary>
    public override void RenderPage(XGraphics gfx)
    {
      base.RenderPage(gfx);

      XPoint[] points = new XPoint[]
      {
        new XPoint(50, 100),
        new XPoint(450, 120),
        new XPoint(550, 300),
        //new XPoint(150, 380),
      };

      gfx.DrawClosedCurve(properties.Pen2.Pen, properties.Brush1.Brush, points, 
        properties.General.FillMode, properties.General.Tension);
    }

    public override string Description
    {
      get {return "DrawClosedCurve";}
    }
  }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?