From 806ae6250e14defabd306eb3ec9019ae283149ab Mon Sep 17 00:00:00 2001 From: Manuel Fuhr Date: Sat, 16 Oct 2021 06:54:02 +0200 Subject: [PATCH] Draw rect using canvas --- .../src/main/java/btools/routingapp/BInstallerView.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/brouter-routing-app/src/main/java/btools/routingapp/BInstallerView.java b/brouter-routing-app/src/main/java/btools/routingapp/BInstallerView.java index f86188b..0b9376b 100644 --- a/brouter-routing-app/src/main/java/btools/routingapp/BInstallerView.java +++ b/brouter-routing-app/src/main/java/btools/routingapp/BInstallerView.java @@ -352,11 +352,9 @@ public class BInstallerView extends View { RoutingHelper.hasDirectoryAnyDatafiles(segmentDir)) btnText = "Update all"; if (btnText != null) { - canvas.drawLine(imgw - btnw, imgh - btnh, imgw - btnw, imgh - 2, paint); - canvas.drawLine(imgw - btnw, imgh - btnh, imgw - 2, imgh - btnh, paint); - canvas.drawLine(imgw - btnw, imgh - btnh, imgw - btnw, imgh - 2, paint); - canvas.drawLine(imgw - 2, imgh - btnh, imgw - 2, imgh - 2, paint); - canvas.drawLine(imgw - btnw, imgh - 2, imgw - 2, imgh - 2, paint); + paint.setStyle(Paint.Style.STROKE); + canvas.drawRect(imgw - btnw, imgh - btnh, imgw - 2, imgh - 2, paint); + paint.setStyle(Paint.Style.FILL); canvas.drawText(btnText, imgw - btnw + 5, imgh - 10, paint); } }