diff --git a/ESP32_AP-Flasher/src/contentmanager.cpp b/ESP32_AP-Flasher/src/contentmanager.cpp index 9334721b..bbf6b976 100644 --- a/ESP32_AP-Flasher/src/contentmanager.cpp +++ b/ESP32_AP-Flasher/src/contentmanager.cpp @@ -2262,9 +2262,22 @@ void drawElement(const JsonObject &element, TFT_eSprite &spr, imgParam &imagePar } else if (element.containsKey("box")) { const JsonArray &boxArray = element["box"]; spr.fillRect(boxArray[0].as(), boxArray[1].as(), boxArray[2].as(), boxArray[3].as(), getColor(boxArray[4])); + if (boxArray.size()>=7) { + for (int i=0; i < boxArray[6].as(); i++) { + spr.drawRect(boxArray[0].as() + i, boxArray[1].as() + i, boxArray[2].as() - 2 * i, boxArray[3].as() - 2 * i, getColor(boxArray[5])); + } + } } else if (element.containsKey("rbox")) { const JsonArray &rboxArray = element["rbox"]; spr.fillRoundRect(rboxArray[0].as(), rboxArray[1].as(), rboxArray[2].as(), rboxArray[3].as(), rboxArray[4].as(), getColor(rboxArray[5])); + if (rboxArray.size() >= 8) { + for (int i = 0; i < rboxArray[7].as(); i++) { + spr.drawRoundRect(rboxArray[0].as() + i, rboxArray[1].as() + i, rboxArray[2].as() - 2 * i, rboxArray[3].as() - 2 * i, rboxArray[4].as() - i / 1.41, getColor(rboxArray[6])); + if (i > 0) { + spr.drawRoundRect(rboxArray[0].as() + i - 1, rboxArray[1].as() + i, rboxArray[2].as() - 2 * i + 2, rboxArray[3].as() - 2 * i, rboxArray[4].as() - i / 1.41, getColor(rboxArray[6])); + } + } + } } else if (element.containsKey("line")) { const JsonArray &lineArray = element["line"]; spr.drawLine(lineArray[0].as(), lineArray[1].as(), lineArray[2].as(), lineArray[3].as(), getColor(lineArray[4]));