public LineTo(char command, ShapeUtil.StringSplitter value) : base(command) { if (char.ToLower(command) == 'h') { PositionType = eType.Horizontal; double v = value.ReadNextValue(); Points = new Point[] { new Point(v, 0) }; return; } if (char.ToLower(command) == 'v') { PositionType = eType.Vertical; double v = value.ReadNextValue(); Points = new Point[] { new Point(0, v) }; return; } PositionType = eType.Point; List <Point> list = new List <Point>(); while (value.More) { Point p = value.ReadNextPoint(); list.Add(p); } Points = list.ToArray(); }
public PolygonShape(XmlNode node) : base(node) { string points = XmlUtil.AttrValue(node, SVGTags.sPoints, string.Empty); ShapeUtil.StringSplitter split = new ShapeUtil.StringSplitter(points); List <Point> list = new List <Point>(); while (split.More) { list.Add(split.ReadNextPoint()); } Points = list.ToArray(); }
public MoveTo(char command, ShapeUtil.StringSplitter value) : base(command) { Point = value.ReadNextPoint(); }
public CurveTo(char command, ShapeUtil.StringSplitter value, Point ctrlPoint1) : base(command) { CtrlPoint1 = ctrlPoint1; CtrlPoint2 = value.ReadNextPoint(); Point = value.ReadNextPoint(); }