summaryrefslogtreecommitdiffstats
path: root/tests/HwAccelerationTest/src/com/android
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2012-09-07 13:56:43 -0700
committerChris Craik <ccraik@google.com>2012-09-07 15:20:38 -0700
commit75040f8a7727f18bb33da23696a32a0760926ff2 (patch)
tree9f32eb9b41df3c09ce0f27abae389695eaa3ff3d /tests/HwAccelerationTest/src/com/android
parent9147cd4ac56d53dec6da1ef13dd04ba1eec1a7df (diff)
downloadframeworks_base-75040f8a7727f18bb33da23696a32a0760926ff2.zip
frameworks_base-75040f8a7727f18bb33da23696a32a0760926ff2.tar.gz
frameworks_base-75040f8a7727f18bb33da23696a32a0760926ff2.tar.bz2
Handle different x, y scales in drawLines AA path
bug:7114630 Fixes different x, y scales, and fixes boundaryWidthProportion to be from center, not edge. Also adds drawLine tests that previously drew blurry. Change-Id: I2b648a60361ad3931eac67647b9b27909525ee1e
Diffstat (limited to 'tests/HwAccelerationTest/src/com/android')
-rw-r--r--tests/HwAccelerationTest/src/com/android/test/hwui/LinesActivity.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/LinesActivity.java b/tests/HwAccelerationTest/src/com/android/test/hwui/LinesActivity.java
index f0abb50..eed0ec8 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/LinesActivity.java
+++ b/tests/HwAccelerationTest/src/com/android/test/hwui/LinesActivity.java
@@ -153,6 +153,14 @@ public class LinesActivity extends Activity {
canvas.drawLine(10.0f, 45.0f, 20.0f, 55.0f, mSmallPaint);
canvas.drawLine(10.0f, 60.0f, 50.0f, 60.0f, mHairLinePaint);
canvas.restore();
+
+ canvas.save();
+ canvas.scale(10.0f, 50.0f);
+ mSmallPaint.setStrokeWidth(0.0f);
+ canvas.drawLine(20.0f, 9.0f, 30.0f, 11.0f, mSmallPaint);
+ mSmallPaint.setStrokeWidth(1.0f);
+ canvas.drawLine(30.0f, 9.0f, 40.0f, 11.0f, mSmallPaint);
+ canvas.restore();
}
}
}