Ejemplo n.º 1
0
        protected override bool TryCreate(string attributeValue, out Path path)
        {
            var bounds   = new XyRect();
            var segments = new List <PathSegment>();

            foreach (var ps in GetPathSegments(attributeValue))
            {
                segments.Add(ps);
                bounds = bounds.Add(ps.Bounds);
            }
            path = new Path(segments.ToArray(), bounds);
            return(true);
        }
Ejemplo n.º 2
0
        public static bool TryParse(string value, out Path path)
        {
            var bounds   = new XyRect();
            var segments = new List <PathSegment>();

            foreach (var ps in GetPathSegments(value))
            {
                segments.Add(ps);
                bounds = bounds.Add(ps.Bounds);
            }
            path = new Path(segments.ToArray(), bounds);
            return(true);
        }