|
| 1 | +using System; |
| 2 | +using System.Collections.Generic; |
| 3 | +using System.Linq; |
| 4 | +using System.Text; |
| 5 | +using System.Threading.Tasks; |
| 6 | +using System.Windows; |
| 7 | + |
| 8 | +namespace XamlPathDataParser.DataContext.PathDataItems |
| 9 | +{ |
| 10 | + public class PathDataItemEllipticalArc : IPathDataItem |
| 11 | + { |
| 12 | + |
| 13 | + public Size size { get; set; } |
| 14 | + |
| 15 | + /// <summary> |
| 16 | + /// The rotation of the ellipse, in degrees. |
| 17 | + /// </summary> |
| 18 | + public double rotationAngle { get; set; } |
| 19 | + |
| 20 | + /// <summary> |
| 21 | + /// Set to 1 if the angle of the arc should be 180 degrees or greater; otherwise, set to 0. |
| 22 | + /// </summary> |
| 23 | + public bool isLargeArc { get; set; } |
| 24 | + |
| 25 | + /// <summary> |
| 26 | + /// Set to 1 if the arc is drawn in a positive-angle direction; otherwise, set to 0. |
| 27 | + /// </summary> |
| 28 | + public int sweepDirection { get; set; } |
| 29 | + |
| 30 | + /// <summary> |
| 31 | + /// The point to which the arc is drawn. |
| 32 | + /// </summary> |
| 33 | + public Point EndPoint { get; set; } |
| 34 | + |
| 35 | + |
| 36 | + public PathDataItemEllipticalArc() |
| 37 | + { } |
| 38 | + |
| 39 | + public PathDataItemEllipticalArc(string Data) |
| 40 | + { |
| 41 | + |
| 42 | + int index = 1; |
| 43 | + |
| 44 | + size = Parser.PathDataParser.ReadSize(Data, index, out index).Value; |
| 45 | + |
| 46 | + rotationAngle = Parser.PathDataParser.ReadDouble(Data, index, out index).Value; |
| 47 | + |
| 48 | + isLargeArc = Parser.PathDataParser.ReadInt(Data, index, out index) == 1; |
| 49 | + |
| 50 | + sweepDirection = Parser.PathDataParser.ReadInt(Data, index, out index).Value; |
| 51 | + |
| 52 | + EndPoint = Parser.PathDataParser.ReadPoint(Data, index, out index).Value; |
| 53 | + |
| 54 | + } |
| 55 | + |
| 56 | + } |
| 57 | +} |
0 commit comments