/// <summary> /// 它创建一个新的SVG折线元素。 /// </summary> public SVGPolyline AddPolyline(SVGUnit parent, ref SVGUnit last) { SVGPolyline poly = new SVGPolyline(this); AddElement(parent, poly, ref last); return(poly); }
public static void SvgPath(string svgPathString) { var origin = ApiManager.Instance.BrushPosition; SVGData svgData = new SVGData(); svgData.Path(svgPathString); SVGPolyline svgPolyline = new SVGPolyline(); svgPolyline.Fill(svgData); DrawStrokes.MultiPath2dToStrokes(svgPolyline.Polyline, origin, 0.01f, true); }
public static DrawPolygonObject Create(SVGPolyline svg) { try { string s = svg.Points.Trim(); string[] arr = s.Split(' '); var points = new PointF[arr.Length]; for (int i = 0; i < arr.Length; i++) { var arrp = arr[i].Split(','); points[i] = new PointF(ParseSize(arrp[0], Dpi.X), ParseSize(arrp[1], Dpi.Y)); } var dobj = new DrawPolygonObject(points); dobj.SetStyleFromSvg(svg); return(dobj); } catch (Exception ex) { SVGErr.Log("DrawPolygonObject", "Create", ex.ToString(), SVGErr._LogPriority.Info); return(null); } }