annotate demos/deform/pathdeform.html @ 381:347e4c7a9ba1

make QwtD compile on Windows@
author Eldar Insafutdinov <e.insafutdinov@gmail.com>
date Sun, 11 Jul 2010 01:59:42 +0100
parents 849b66609571
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
161
849b66609571 a few fixes
mwarning
parents:
diff changeset
1 <html>
849b66609571 a few fixes
mwarning
parents:
diff changeset
2 <center>
849b66609571 a few fixes
mwarning
parents:
diff changeset
3 <h2>Vector deformation</h2>
849b66609571 a few fixes
mwarning
parents:
diff changeset
4 </center>
849b66609571 a few fixes
mwarning
parents:
diff changeset
5
849b66609571 a few fixes
mwarning
parents:
diff changeset
6 <p>This demo shows how to use advanced vector techniques to draw text
849b66609571 a few fixes
mwarning
parents:
diff changeset
7 using a <code>QPainterPath</code>.</p>
849b66609571 a few fixes
mwarning
parents:
diff changeset
8
849b66609571 a few fixes
mwarning
parents:
diff changeset
9 <p>We define a vector deformation field in the shape of a lens and apply
849b66609571 a few fixes
mwarning
parents:
diff changeset
10 this to all points in a path. This means that what is rendered on
849b66609571 a few fixes
mwarning
parents:
diff changeset
11 screen is not pixel manipulation, but modified vector representations of
849b66609571 a few fixes
mwarning
parents:
diff changeset
12 the glyphs themselves. This is visible from the high quality of the
849b66609571 a few fixes
mwarning
parents:
diff changeset
13 antialiased edges for the deformed glyphs.</p>
849b66609571 a few fixes
mwarning
parents:
diff changeset
14
849b66609571 a few fixes
mwarning
parents:
diff changeset
15 <p>To get a fairly complex path we allow the user to type in text and
849b66609571 a few fixes
mwarning
parents:
diff changeset
16 convert the text to paths. This is done using the
849b66609571 a few fixes
mwarning
parents:
diff changeset
17 <code>QPainterPath::addText()</code> function.</p>
849b66609571 a few fixes
mwarning
parents:
diff changeset
18
849b66609571 a few fixes
mwarning
parents:
diff changeset
19 <p>The lens is drawn using a single call to <code>drawEllipse()</code>, using
849b66609571 a few fixes
mwarning
parents:
diff changeset
20 a <code>QRadialGradient</code> to fill it with a specialized color table,
849b66609571 a few fixes
mwarning
parents:
diff changeset
21 giving the effect of the Sun's reflection and a drop shadow. The lens
849b66609571 a few fixes
mwarning
parents:
diff changeset
22 is cached as a pixmap for better performance.</p>
849b66609571 a few fixes
mwarning
parents:
diff changeset
23
849b66609571 a few fixes
mwarning
parents:
diff changeset
24 </html>