summaryrefslogtreecommitdiffstats
path: root/tests/arthur
diff options
context:
space:
mode:
authorTom Cooksey <thomas.cooksey@nokia.com>2010-01-02 16:05:45 (GMT)
committerTom Cooksey <thomas.cooksey@nokia.com>2010-01-04 07:58:49 (GMT)
commitd1846e00155a1555baf9927a66e7f5de9fc08940 (patch)
tree401be094c8b3aca97910079d4cf728048603d38c /tests/arthur
parent44065fd91ee36ff17075ae74c4756893721bf675 (diff)
downloadQt-d1846e00155a1555baf9927a66e7f5de9fc08940.zip
Qt-d1846e00155a1555baf9927a66e7f5de9fc08940.tar.gz
Qt-d1846e00155a1555baf9927a66e7f5de9fc08940.tar.bz2
New lance test for checking aliased vs antialiased rendering
This test renders various primitives with anti-aliasing both on and off. It then repeats the render at several non-integer offsets. Note: The reference image was generated with the raster engine, which seems to have off-by-one errors on fills when rendering aliased (It seems to ceil the coords rather than round them). Reviewed-By: Trustme
Diffstat (limited to 'tests/arthur')
-rw-r--r--tests/arthur/data/qps/aliasing.qps156
-rw-r--r--tests/arthur/data/qps/aliasing_qps.pngbin0 -> 30531 bytes
2 files changed, 156 insertions, 0 deletions
diff --git a/tests/arthur/data/qps/aliasing.qps b/tests/arthur/data/qps/aliasing.qps
new file mode 100644
index 0000000..59878f9
--- /dev/null
+++ b/tests/arthur/data/qps/aliasing.qps
@@ -0,0 +1,156 @@
+
+path_moveTo convexPath 25 0
+path_lineTo convexPath 50 50
+path_lineTo convexPath 25 25
+path_lineTo convexPath 0 50
+path_closeSubpath convexPath
+
+pixmap_load border.png pixmap
+
+setRenderHint LineAntialiasing false
+translate 10 10
+
+begin_block drawing
+ setPen black 1
+ setBrush 7f7fff
+ drawPath convexPath
+
+ setFont "monospace" 8
+ setPen black
+ drawText 0 68 "QwErTy@"
+
+
+ setPen black 1
+ setBrush 7f7fff
+ drawRect 0 80 10 5
+
+ setPen black 1
+ setBrush noBrush
+ drawRect 20 80 10 5
+
+ setPen noPen
+ setBrush 7f7fff
+ drawRect 40 80 10 5
+
+
+ setPen black 2
+ setBrush 7f7fff
+ drawRect 0 90 10 5
+
+ setPen black 2
+ setBrush noBrush
+ drawRect 20 90 10 5
+
+ setPen noPen
+ setBrush 7f7fff
+ drawRect 40 90 10 5
+
+
+ setPen black 3
+ setBrush 7f7fff
+ drawRect 0 100 10 5
+
+ setPen black 3
+ setBrush noBrush
+ drawRect 20 100 10 5
+
+ setPen noPen
+ setBrush 7f7fff
+ drawRect 40 100 10 5
+
+
+ setPen black 1
+ setBrush noBrush
+ drawLine 10 110 20 120
+ drawLine 30 120 40 110
+
+ setPen black 2
+ setBrush noBrush
+ drawLine 10 120 20 130
+ drawLine 30 130 40 120
+
+ setPen black 3
+ setBrush noBrush
+ drawLine 10 130 20 140
+ drawLine 30 140 40 130
+
+ drawPixmap pixmap 0 150
+
+ setRenderHint SmoothPixmapTransform false
+ drawPixmap pixmap 20 150 15 15 0 0 10 10
+
+end_block
+
+translate 0 180
+setRenderHint LineAntialiasing true
+repeat_block drawing
+drawText 15 185 "0.0"
+
+resetMatrix
+translate 70.2 10.2
+setRenderHint LineAntialiasing false
+repeat_block drawing
+translate 0 180
+setRenderHint LineAntialiasing true
+repeat_block drawing
+translate -0.2 -0.2
+drawText 15 185 "0.2"
+
+
+resetMatrix
+translate 130.4 10.4
+setRenderHint LineAntialiasing false
+repeat_block drawing
+translate 0 180
+setRenderHint LineAntialiasing true
+repeat_block drawing
+translate -0.4 -0.4
+drawText 15 185 "0.4"
+
+
+resetMatrix
+translate 190.5 10.5
+setRenderHint LineAntialiasing false
+repeat_block drawing
+translate 0 180
+setRenderHint LineAntialiasing true
+repeat_block drawing
+translate -0.5 -0.5
+drawText 15 185 "0.5"
+
+
+resetMatrix
+translate 250.6 10.6
+setRenderHint LineAntialiasing false
+repeat_block drawing
+translate 0 180
+setRenderHint LineAntialiasing true
+repeat_block drawing
+translate -0.6 -0.6
+drawText 15 185 "0.6"
+
+
+resetMatrix
+translate 310.8 10.8
+setRenderHint LineAntialiasing false
+repeat_block drawing
+translate 0 180
+setRenderHint LineAntialiasing true
+repeat_block drawing
+translate -0.8 -0.8
+drawText 15 185 "0.8"
+
+
+resetMatrix
+translate 371 11
+setRenderHint LineAntialiasing false
+repeat_block drawing
+translate 0 180
+setRenderHint LineAntialiasing true
+repeat_block drawing
+drawText 15 185 "1.0"
+
+
+resetMatrix
+drawText 430 95 "Aliased"
+drawText 430 275 "Anti-Aliased" \ No newline at end of file
diff --git a/tests/arthur/data/qps/aliasing_qps.png b/tests/arthur/data/qps/aliasing_qps.png
new file mode 100644
index 0000000..183129b
--- /dev/null
+++ b/tests/arthur/data/qps/aliasing_qps.png
Binary files differ