Esempio n. 1
0
        public override IPath GetPath()
        {
            var         points = PolygonRegular.CalculateVertices(Vertices, Radius, Angle, Center);
            PathBuilder pb     = new PathBuilder();

            pb.AddLines(points);
            pb.CloseFigure();
            return(pb.Build());
        }
Esempio n. 2
0
        public override string SVG(string attrs)
        {
            var           p      = PolygonRegular.CalculateVertices(Vertices, Radius, Angle, Center);
            List <string> points = new List <string>();

            foreach (var xy in p)
            {
                points.Add($"{xy.X},{xy.Y}");
            }
            return($"<polygon {attrs} points=\"" + String.Join(",", points) + "\" />");
        }