From b7aba2a2d422f9fed6f1741f5c28fa1fc75a67d6 Mon Sep 17 00:00:00 2001 From: Tim Beissinger Date: Sat, 28 Mar 2020 17:23:08 +0100 Subject: [PATCH] Fixed width/height bug for drawing images Bug was initially reported Sept 11, 2018: "Utils drawImage issue #4225". PhilJay wrote that he planned to fix it but it hasn't been incorporated yet. (https://github.com/PhilJay/MPAndroidChart/issues/4225) --- .../src/main/java/com/github/mikephil/charting/utils/Utils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MPChartLib/src/main/java/com/github/mikephil/charting/utils/Utils.java b/MPChartLib/src/main/java/com/github/mikephil/charting/utils/Utils.java index 60ff6ba3da..a3e142fce1 100644 --- a/MPChartLib/src/main/java/com/github/mikephil/charting/utils/Utils.java +++ b/MPChartLib/src/main/java/com/github/mikephil/charting/utils/Utils.java @@ -537,7 +537,7 @@ public static void drawImage(Canvas canvas, mDrawableBoundsCache.left, mDrawableBoundsCache.top, mDrawableBoundsCache.left + width, - mDrawableBoundsCache.top + width); + mDrawableBoundsCache.top + height); int saveId = canvas.save(); // translate to the correct position and draw