master
周文涛 2 years ago
parent d877f41342
commit 5780d79193

@ -163,10 +163,11 @@ public class ImageUtils {
for (JSONObject jo : jos) { for (JSONObject jo : jos) {
List<Point> points = new ArrayList<>(); List<Point> points = new ArrayList<>();
if (jo.containsKey("area")) { if (jo.containsKey("area")) {
List<JSONObject> areas = jo.getJSONArray("area").toJavaList(JSONObject.class); JSONArray areas = jo.getJSONArray("area");
for (JSONObject area : areas) { for (int i = 0; i < areas.size(); i++) {
Integer[] doubles = area.values().toArray(new Integer[0]); JSONArray doubles = areas.getJSONArray(i);
points.add(new Point(doubles[0], doubles[1]));
points.add(new Point(doubles.getInteger(0),doubles.getInteger(1)));
} }
} }
if (points.size() > 0) { if (points.size() > 0) {

Loading…
Cancel
Save