Пример #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 EllipticalArcTo(char command, ShapeUtil.StringSplitter value)
     : base(command)
 {
     this.RX = value.ReadNextValue();
     this.RY = value.ReadNextValue();
     this.AxisRotation = value.ReadNextValue();
     double arcflag = value.ReadNextValue();
     this.LargeArc = (arcflag > 0);
     double sweepflag = value.ReadNextValue();
     this.Clockwise = (sweepflag > 0);
     this.X = value.ReadNextValue();
     this.Y = value.ReadNextValue();
 }