summaryrefslogtreecommitdiffstats
path: root/tools/layoutlib
diff options
context:
space:
mode:
authorDeepanshu Gupta <deepanshu@google.com>2014-02-05 17:11:14 -0800
committerDeepanshu Gupta <deepanshu@google.com>2014-02-05 17:16:35 -0800
commit8a892279bd1b212311f4200f306a317985463918 (patch)
treedc44d74891536a130faa8df3d2e12163be89a10e /tools/layoutlib
parentc174288d345d4a80b326b12ff4c10a6c99570997 (diff)
downloadframeworks_base-8a892279bd1b212311f4200f306a317985463918.zip
frameworks_base-8a892279bd1b212311f4200f306a317985463918.tar.gz
frameworks_base-8a892279bd1b212311f4200f306a317985463918.tar.bz2
Fix a bug in Nine Patch library.
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
Diffstat (limited to 'tools/layoutlib')
-rw-r--r--tools/layoutlib/bridge/src/android/graphics/NinePatch_Delegate.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/layoutlib/bridge/src/android/graphics/NinePatch_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/NinePatch_Delegate.java
index b513463..a79ec8f 100644
--- a/tools/layoutlib/bridge/src/android/graphics/NinePatch_Delegate.java
+++ b/tools/layoutlib/bridge/src/android/graphics/NinePatch_Delegate.java
@@ -176,7 +176,7 @@ public final class NinePatch_Delegate {
/*package*/ static void nativeDraw(int canvas_instance, RectF loc, int bitmap_instance,
int chunk, 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, chunk, paint_instance_or_null,
destDensity, srcDensity);
}
@@ -185,7 +185,7 @@ public final class NinePatch_Delegate {
/*package*/ static void nativeDraw(int canvas_instance, Rect loc, int bitmap_instance,
int chunk, 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, chunk, paint_instance_or_null,
destDensity, srcDensity);
}