aboutsummaryrefslogtreecommitdiffstats
path: root/ninepatch
diff options
context:
space:
mode:
authorXavier Ducrohet <xav@android.com>2012-10-01 17:57:04 -0700
committerXavier Ducrohet <xav@android.com>2012-10-01 17:57:04 -0700
commit795a4ad26824b0e553ca49161a8b4999b8181f8d (patch)
treeb4a846cd88e9253394ebd91919e0e9152dddaac2 /ninepatch
parent76f0d2a0a94645646eb884404838947dd38529b3 (diff)
downloadsdk-795a4ad26824b0e553ca49161a8b4999b8181f8d.zip
sdk-795a4ad26824b0e553ca49161a8b4999b8181f8d.tar.gz
sdk-795a4ad26824b0e553ca49161a8b4999b8181f8d.tar.bz2
Fix scaling of ninepatches.
Change-Id: Id9888dec034d3010de35aa61ee5f651a672fc410
Diffstat (limited to 'ninepatch')
-rw-r--r--ninepatch/src/com/android/ninepatch/NinePatchChunk.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/ninepatch/src/com/android/ninepatch/NinePatchChunk.java b/ninepatch/src/com/android/ninepatch/NinePatchChunk.java
index 6dca61e..20abaeb 100644
--- a/ninepatch/src/com/android/ninepatch/NinePatchChunk.java
+++ b/ninepatch/src/com/android/ninepatch/NinePatchChunk.java
@@ -86,7 +86,7 @@ public class NinePatchChunk implements Serializable {
graphics2D = (Graphics2D) graphics2D.create();
// scale and transform
- float densityScale = (float) destDensity / srcDensity;
+ float densityScale = ((float) destDensity) / (float) srcDensity;
// translate/rotate the canvas.
graphics2D.translate(x, y);