diff options
author | Joseph Herlant <aerostitch@debian.org> | 2019-10-29 16:54:35 -0700 |
---|---|---|
committer | Joseph Herlant <aerostitch@debian.org> | 2019-10-29 16:54:35 -0700 |
commit | 125cd138935a70d990331ce3f7681a3ddf5fe758 (patch) | |
tree | 64975f89f75cc3aa134421034d110341c53da8d9 | |
parent | 989399c03f822e467486c64d03f1d3e367f65644 (diff) | |
download | navit-125cd138935a70d990331ce3f7681a3ddf5fe758.tar.gz |
Fix checkstyle errors
-rw-r--r-- | navit/android/src/org/navitproject/navit/NavitGraphics.java | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/navit/android/src/org/navitproject/navit/NavitGraphics.java b/navit/android/src/org/navitproject/navit/NavitGraphics.java index 3edc68634..855f93d87 100644 --- a/navit/android/src/org/navitproject/navit/NavitGraphics.java +++ b/navit/android/src/org/navitproject/navit/NavitGraphics.java @@ -868,13 +868,14 @@ class NavitGraphics { // One might ask why the coordinates for the holes are smashed all together in one int array. It's because // I have no clue at all how to properly do JNI with an array of int arrays instead. - protected void draw_polygon_with_holes(Paint paint, int stroke_width, int r, int g, int b, int a, int[] c, int[] ccount, int[] holes) { - paint.setStrokeWidth(stroke_width); + protected void draw_polygon_with_holes(Paint paint, int strokeWidth, int r, int g, int b, int a, int[] c, + int[] ccount, int[] holes) { + paint.setStrokeWidth(strokeWidth); paint.setARGB(a,r,g,b); paint.setStyle(Paint.Style.FILL_AND_STROKE); //paint.setAntiAlias(true); // Check if we got at least three coordinates (3 values) - if(c.length < 6) { + if (c.length < 6) { return; } @@ -888,20 +889,20 @@ class NavitGraphics { // close outer polygon path.close(); // add holes if any - int coordinates_used = 0; + int coordinatesUsed = 0; // for every hole - for(int i = 0; i < ccount.length; i ++) { + for (int i = 0; i < ccount.length; i++) { // drop holes with less than 3 coordinates - if(ccount[i] > 6) { - path.moveTo(holes[coordinates_used + 0], holes[coordinates_used +1]); - for(int j = 2; j < ccount[i]; j += 2) { - path.lineTo(holes[coordinates_used + j], holes[coordinates_used + j + 1]); + if (ccount[i] > 6) { + path.moveTo(holes[coordinatesUsed + 0], holes[coordinatesUsed + 1]); + for (int j = 2; j < ccount[i]; j += 2) { + path.lineTo(holes[coordinatesUsed + j], holes[coordinatesUsed + j + 1]); } // close this hole path.close(); } //remeber the used coordinates for next hole - coordinates_used += ccount[i]; + coordinatesUsed += ccount[i]; } // Set fill rule |