//private static double FlipY(double y, Geometry.Extent2D viewBox) //{ // return viewBox.min.y + viewBox.max.y - y; //} //private static Geometry.Point2D FlipY(Geometry.Point2D p, Geometry.Extent2D viewBox) //{ // double y = viewBox.min.y + viewBox.max.y - p.y; // return new Geometry.Point2D(p.x, y); //} //private static List<Geometry.Point2D> FlipY(IEnumerable<Geometry.Point2D> points, Geometry.Extent2D viewBox) //{ // return points.Select(p => FlipY(p, viewBox)).ToList(); //} // 世界坐标绘图函数以Add开头 public void AddLine(double x1, double y1, double x2, double y2) { x1 = _calcx(x1); y1 = _calcy(y1); x2 = _calcx(x2); y2 = _calcy(y2); _svgWriter.AddLine(x1.ToString("0.##"), y1.ToString("0.##"), x2.ToString("0.##"), y2.ToString("0.##")); }