15832144755
2022-03-17 bc131131c5c96f8cb3bed679d4a359820c22e335
src/main/java/com/hxzkoa/json/tb_fence.java
@@ -121,14 +121,14 @@
      String ju_xing = "矩形";
      if (ju_xing.equals(shape)) {
         String[] zb = zuobiao.split("\\,");// 用逗号分割
         int x0 = Integer.parseInt(zb[0]);
         int y0 = Integer.parseInt(zb[1]);
         int x2 = Integer.parseInt(zb[2]);
         int y2 = Integer.parseInt(zb[3]);
         int x1 = x2;
         int y1 = y0;
         int x3 = x0;
         int y3 = y2;
         Double x0 = Double.parseDouble(zb[0]);
         Double y0 = Double.parseDouble(zb[1]);
         Double x2 = Double.parseDouble(zb[2]);
         Double y2 = Double.parseDouble(zb[3]);
         Double x1 = x2;
         Double y1 = y0;
         Double x3 = x0;
         Double y3 = y2;
         Point2D.Double p0 = new Point2D.Double(x0, y0);
         Point2D.Double p1 = new Point2D.Double(x1, y1);
         Point2D.Double p2 = new Point2D.Double(x2, y2);
@@ -143,7 +143,7 @@
         for (int i = 0; i < bian; i++) {
//          String zbxy = zb[i];
            String[] xy = Arrays.copyOfRange(zb,2*i,2*i+2);// 以“,”分割字符串从而获得每个点的x和y
            Point2D.Double p = new Point2D.Double(Integer.parseInt(xy[0]), Integer.parseInt(xy[1]));
            Point2D.Double p = new Point2D.Double(Double.parseDouble(xy[0]), Double.parseDouble(xy[1]));
            pts.add(p);
         }