SvgLineSegment.cs 694 Bytes
Newer Older
davescriven's avatar
davescriven committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;

namespace Svg.Pathing
{
    public sealed class SvgLineSegment : SvgPathSegment
    {
        public SvgLineSegment(PointF start, PointF end)
        {
            this.Start = start;
            this.End = end;
        }

        public override void AddToPath(System.Drawing.Drawing2D.GraphicsPath graphicsPath)
        {
18
19
20
21
            if (this.Start != this.End)
            {
                graphicsPath.AddLine(this.Start, this.End);
            }
davescriven's avatar
davescriven committed
22
        }
Tebjan Halm's avatar
Tebjan Halm committed
23
24
25
26
27
28
        
        public override string ToString()
		{
        	return "L" + this.End.ToSvgString();
		}

davescriven's avatar
davescriven committed
29
30
    }
}