예제 #1
0
        internal static IEnumerable <SvgPathSegment> GetSvgPathSegments(this DxfHatch.SplineBoundaryPathEdge splineBoundary)
        {
            Spline          spline          = new Spline(splineBoundary);
            PiecewiseBezier piecewiseBezier = new PiecewiseBezier(spline);
            var             paths           = piecewiseBezier.ToSvgPath().Segments;

            return(paths);
        }
예제 #2
0
        public static XElement ToXElement(this DxfSpline spline)
        {
            Spline          spline1   = new Spline(spline);
            PiecewiseBezier piecewise = new PiecewiseBezier(spline1);

            var path = piecewise.ToSvgPath();

            return(new XElement(DxfToSvgConverter.Xmlns + "path",
                                new XAttribute("d", path.ToString()),
                                new XAttribute("fill-opacity", 0))
                   .AddStroke(spline.Color)
                   .AddStrokeWidth(1.0)
                   .AddVectorEffect());
        }