summaryrefslogtreecommitdiffstats
path: root/tests/auto/lancelot/scripts/text.qps
diff options
context:
space:
mode:
authorQt by Nokia <qt-info@nokia.com>2011-04-27 12:05:43 +0200
committeraxis <qt-info@nokia.com>2011-04-27 12:05:43 +0200
commit38be0d13830efd2d98281c645c3a60afe05ffece (patch)
tree6ea73f3ec77f7d153333779883e8120f82820abe /tests/auto/lancelot/scripts/text.qps
Initial import from the monolithic Qt.
This is the beginning of revision history for this module. If you want to look at revision history older than this, please refer to the Qt Git wiki for how to use Git history grafting. At the time of writing, this wiki is located here: http://qt.gitorious.org/qt/pages/GitIntroductionWithQt If you have already performed the grafting and you don't see any history beyond this commit, try running "git log" with the "--follow" argument. Branched from the monolithic repo, Qt master branch, at commit 896db169ea224deb96c59ce8af800d019de63f12
Diffstat (limited to 'tests/auto/lancelot/scripts/text.qps')
-rw-r--r--tests/auto/lancelot/scripts/text.qps124
1 files changed, 124 insertions, 0 deletions
diff --git a/tests/auto/lancelot/scripts/text.qps b/tests/auto/lancelot/scripts/text.qps
new file mode 100644
index 0000000000..d7ee83290b
--- /dev/null
+++ b/tests/auto/lancelot/scripts/text.qps
@@ -0,0 +1,124 @@
+# Version: 1
+
+drawText -5 5 "Text that is drawn outside the bounds..."
+
+translate 20 20
+begin_block text_drawing
+save
+ setFont "sansserif" 10 normal
+ drawText 0 20 "sansserif 10pt, normal"
+
+ setFont "sansserif" 12 normal
+ drawText 0 40 "sansserif 12pt, normal"
+
+ setFont "sansserif" 10 bold
+ drawText 0 60 "sansserif 12pt, bold"
+
+ setFont "sansserif" 10 bold italic
+ drawText 0 80 "sansserif 10pt, bold italic"
+
+
+ translate 0 100
+ setPen #7fff0000
+
+ setFont "sansserif" 10 normal
+ drawText 0 20 "alpha sansserif 10pt, normal"
+
+ setFont "sansserif" 12 normal
+ drawText 0 40 "alpha sansserif 12pt, normal"
+
+ setFont "sansserif" 10 bold
+ drawText 0 60 "alpha sansserif 12pt, bold"
+
+ setFont "sansserif" 10 bold italic
+ drawText 0 80 "alpha sansserif 10pt, bold italic"
+
+
+ translate 0 100
+ setPen black
+ save
+ scale 0.9 0.9
+
+ setFont "sansserif" 10 normal
+ drawText 0 20 "scaled sansserif 10pt, normal"
+
+ setFont "sansserif" 12 normal
+ drawText 0 40 "scaled sansserif 12pt, normal"
+
+ setFont "sansserif" 10 bold
+ drawText 0 60 "scaled sansserif 12pt, bold"
+
+ setFont "sansserif" 10 bold italic
+ drawText 0 80 "scaled sansserif 10pt, bold italic"
+ restore
+
+ translate 0 100
+ setPen black
+ save
+ translate 200 90
+ rotate 185
+
+ setFont "sansserif" 10 normal
+ drawText 0 20 "scaled sansserif 10pt, normal"
+
+ setFont "sansserif" 12 normal
+ drawText 0 40 "scaled sansserif 12pt, normal"
+
+ setFont "sansserif" 10 bold
+ drawText 0 60 "scaled sansserif 12pt, bold"
+
+ setFont "sansserif" 10 bold italic
+ drawText 0 80 "scaled sansserif 10pt, bold italic"
+ restore
+
+ translate 0 100
+ gradient_appendStop 0 red
+ gradient_appendStop 0.5 #00ff00
+ gradient_appendStop 1 blue
+ gradient_setLinear 0 0 200 0
+ setPen brush
+
+ setFont "sansserif" 10 normal
+ drawText 0 0 "gradient sansserif 10pt, normal"
+
+ setFont "sansserif" 12 normal
+ drawText 0 20 "gradient sansserif 12pt, normal"
+
+ setFont "sansserif" 10 bold
+ drawText 0 40 "gradient sansserif 12pt, bold"
+
+ setFont "sansserif" 10 bold italic
+ drawText 0 60 "gradient sansserif 10pt, bold italic"
+restore
+end_block
+
+translate 250 0
+drawText 25 520 "clipped to rectangle"
+save
+ setPen #3f000000
+ setBrush nobrush
+ drawRect 20 0 100 500
+ setClipRect 20 0 100 500
+ setPen black
+ repeat_block text_drawing
+restore
+
+translate 150 0
+drawText 25 520 "clipped to path"
+save
+ path_moveTo clip 20 0
+ path_cubicTo clip 0 200 40 400 20 400
+ path_lineTo clip 30 500
+ path_lineTo clip 30 0
+ path_lineTo clip 40 0
+ path_lineTo clip 40 500
+ path_lineTo clip 120 500
+ path_lineTo clip 120 0
+ path_lineTo clip 20 0
+ setPen #3f000000
+ setBrush nobrush
+ drawPath clip
+ setClipPath clip
+ setPen black
+ repeat_block text_drawing
+restore \ No newline at end of file