示例#1
0
            public LineTo(char command, ShapeUtil.StringSplitter value)
                : base(command)
            {
                if (char.ToLower(command) == 'h')
                {
                    this.PositionType = eType.Horizontal;
                    double v = value.ReadNextValue();
                    this.Points = new Point[] { new Point(v, 0) };
                    return;
                }
                if (char.ToLower(command) == 'v')
                {
                    this.PositionType = eType.Vertical;
                    double v = value.ReadNextValue();
                    this.Points = new Point[] { new Point(0, v) };
                    return;
                }

                this.PositionType = eType.Point;
                List<Point> list = new List<Point>();
                while (value.More)
                {
                    Point p = value.ReadNextPoint();
                    list.Add(p);
                }
                this.Points = list.ToArray();
            }
示例#2
0
 public MoveTo(char command, ShapeUtil.StringSplitter value)
     : base(command)
 {
     this.Point = value.ReadNextPoint();
 }
示例#3
0
 public CurveTo(char command, ShapeUtil.StringSplitter value, Point ctrlPoint1)
     : base(command)
 {
     this.CtrlPoint1 = ctrlPoint1;
     this.CtrlPoint2 = value.ReadNextPoint();
     this.Point = value.ReadNextPoint();
 }