Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ee1187a9 authored by Deepanshu Gupta's avatar Deepanshu Gupta
Browse files

Fix a bug in Nine Patch library. [DO NOT MERGE]

The nine patches were not drawn correctly if they were not positioned at
the top left corner of the canvas.

Bug: http://b.android.com/29959
Change-Id: Icfed522ea07322a3ee9f3955067d3da26c4b0b5b
(cherry-picked from 8a892279)
parent 4cf6286c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -159,7 +159,7 @@ public final class NinePatch_Delegate {
    /*package*/ static void nativeDraw(int canvas_instance, RectF loc, int bitmap_instance,
            byte[] c, int paint_instance_or_null, int destDensity, int srcDensity) {
        draw(canvas_instance,
                (int) loc.left, (int) loc.top, (int) loc.width(), (int) loc.height(),
                (int) loc.left, (int) loc.top, (int) loc.right, (int) loc.bottom,
                bitmap_instance, c, paint_instance_or_null,
                destDensity, srcDensity);
    }
@@ -168,7 +168,7 @@ public final class NinePatch_Delegate {
    /*package*/ static void nativeDraw(int canvas_instance, Rect loc, int bitmap_instance,
            byte[] c, int paint_instance_or_null, int destDensity, int srcDensity) {
        draw(canvas_instance,
                loc.left, loc.top, loc.width(), loc.height(),
                loc.left, loc.top, loc.right, loc.bottom,
                bitmap_instance, c, paint_instance_or_null,
                destDensity, srcDensity);
    }