File: qpaintengine.html

package info (click to toggle)
python-qt4 4.0.1-5
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 18,632 kB
  • ctags: 2,639
  • sloc: python: 29,409; sh: 5,646; cpp: 3,168; xml: 149; makefile: 109
file content (317 lines) | stat: -rw-r--r-- 28,937 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html><head><title>QPaintEngine Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
td.postheader { font-family: sans-serif }
tr.address { font-family: sans-serif }
body { background: #ffffff; color: black; }
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">&#160;&#160;</td><td class="postheader" valign="center"><a href="../pyqt4ref.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QPaintEngine Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1><p>The QPaintEngine class provides an abstract definition of how <a href="qpainter.html">QPainter</a> draws to a given device on a given platform. <a href="#details">More...</a></p>
<h3>Types</h3><ul><li><div class="fn" />enum <b><a href="qpaintengine.html#DirtyFlag-enum">DirtyFlag</a></b> { DirtyPen, DirtyBrush, DirtyBrushOrigin, DirtyFont, ..., AllDirty }</li><li><div class="fn" />class <b><a href="qpaintengine-dirtyflags.html">DirtyFlags</a></b></li><li><div class="fn" />enum <b><a href="qpaintengine.html#PaintEngineFeature-enum">PaintEngineFeature</a></b> { PrimitiveTransform, PatternTransform, PixmapTransform, PatternBrush, ..., AllFeatures }</li><li><div class="fn" />class <b><a href="qpaintengine-paintenginefeatures.html">PaintEngineFeatures</a></b></li><li><div class="fn" />enum <b><a href="qpaintengine.html#PolygonDrawMode-enum">PolygonDrawMode</a></b> { OddEvenMode, WindingMode, ConvexMode, PolylineMode }</li><li><div class="fn" />enum <b><a href="qpaintengine.html#Type-enum">Type</a></b> { X11, Windows, QuickDraw, CoreGraphics, ..., MaxUser }</li></ul><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qpaintengine.html#QPaintEngine">__init__</a></b> (<i>self</i>, PaintEngineFeatures&#160;<i>features</i>&#160;=&#160;0)</li><li><div class="fn" /><b><a href="qpaintengine.html#QPaintEngine-2">__init__</a></b> (<i>self</i>, QPaintEngine)</li><li><div class="fn" />bool <b><a href="qpaintengine.html#begin">begin</a></b> (<i>self</i>, QPaintDevice&#160;<i>pdev</i>)</li><li><div class="fn" /><b><a href="qpaintengine.html#drawEllipse">drawEllipse</a></b> (<i>self</i>, QRectF&#160;<i>r</i>)</li><li><div class="fn" /><b><a href="qpaintengine.html#drawEllipse-2">drawEllipse</a></b> (<i>self</i>, QRect&#160;<i>r</i>)</li><li><div class="fn" /><b><a href="qpaintengine.html#drawImage">drawImage</a></b> (<i>self</i>, QRectF&#160;<i>r</i>, QImage&#160;<i>pm</i>, QRectF&#160;<i>sr</i>, Qt.ImageConversionFlags&#160;<i>flags</i>&#160;=&#160;Qt.AutoColor)</li><li><div class="fn" /><b><a href="qpaintengine.html#drawLines">drawLines</a></b> (<i>self</i>, QLine&#160;<i>lines</i>, int&#160;<i>lineCount</i>)</li><li><div class="fn" /><b><a href="qpaintengine.html#drawLines-2">drawLines</a></b> (<i>self</i>, QLineF&#160;<i>lines</i>, int&#160;<i>lineCount</i>)</li><li><div class="fn" /><b><a href="qpaintengine.html#drawPath">drawPath</a></b> (<i>self</i>, QPainterPath&#160;<i>path</i>)</li><li><div class="fn" /><b><a href="qpaintengine.html#drawPixmap">drawPixmap</a></b> (<i>self</i>, QRectF&#160;<i>r</i>, QPixmap&#160;<i>pm</i>, QRectF&#160;<i>sr</i>)</li><li><div class="fn" /><b><a href="qpaintengine.html#drawPoints">drawPoints</a></b> (<i>self</i>, QPointF&#160;<i>points</i>, int&#160;<i>pointCount</i>)</li><li><div class="fn" /><b><a href="qpaintengine.html#drawPoints-2">drawPoints</a></b> (<i>self</i>, QPoint&#160;<i>points</i>, int&#160;<i>pointCount</i>)</li><li><div class="fn" /><b><a href="qpaintengine.html#drawPolygon">drawPolygon</a></b> (<i>self</i>, QPointF&#160;<i>points</i>, int&#160;<i>pointCount</i>, PolygonDrawMode&#160;<i>mode</i>)</li><li><div class="fn" /><b><a href="qpaintengine.html#drawPolygon-2">drawPolygon</a></b> (<i>self</i>, QPoint&#160;<i>points</i>, int&#160;<i>pointCount</i>, PolygonDrawMode&#160;<i>mode</i>)</li><li><div class="fn" /><b><a href="qpaintengine.html#drawRects">drawRects</a></b> (<i>self</i>, QRect&#160;<i>rects</i>, int&#160;<i>rectCount</i>)</li><li><div class="fn" /><b><a href="qpaintengine.html#drawRects-2">drawRects</a></b> (<i>self</i>, QRectF&#160;<i>rects</i>, int&#160;<i>rectCount</i>)</li><li><div class="fn" /><b><a href="qpaintengine.html#drawTextItem">drawTextItem</a></b> (<i>self</i>, QPointF&#160;<i>p</i>, QTextItem&#160;<i>textItem</i>)</li><li><div class="fn" /><b><a href="qpaintengine.html#drawTiledPixmap">drawTiledPixmap</a></b> (<i>self</i>, QRectF&#160;<i>r</i>, QPixmap&#160;<i>pixmap</i>, QPointF&#160;<i>s</i>)</li><li><div class="fn" />bool <b><a href="qpaintengine.html#end">end</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qpaintengine.html#hasFeature">hasFeature</a></b> (<i>self</i>, PaintEngineFeatures&#160;<i>feature</i>)</li><li><div class="fn" />bool <b><a href="qpaintengine.html#isActive">isActive</a></b> (<i>self</i>)</li><li><div class="fn" />QPaintDevice <b><a href="qpaintengine.html#paintDevice">paintDevice</a></b> (<i>self</i>)</li><li><div class="fn" />QPainter <b><a href="qpaintengine.html#painter">painter</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qpaintengine.html#setActive">setActive</a></b> (<i>self</i>, bool&#160;<i>newState</i>)</li><li><div class="fn" /><b><a href="qpaintengine.html#setPaintDevice">setPaintDevice</a></b> (<i>self</i>, QPaintDevice&#160;<i>device</i>)</li><li><div class="fn" />Type <b><a href="qpaintengine.html#type">type</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qpaintengine.html#updateState">updateState</a></b> (<i>self</i>, QPaintEngineState&#160;<i>state</i>)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QPaintEngine class provides an abstract definition of how <a href="qpainter.html">QPainter</a> draws to a given device on a given platform.</p>
<p>Qt 4.0 provides several premade implementations of QPaintEngine for the different painter backends we support. We provide one paint engine for each window system and painting framework we support. This includes X11 on Unix/Linux and <a href="qpaintengine.html#Type-enum">CoreGraphics</a> on Mac OS X. In addition we provide QPaintEngine implementations for <a href="qpaintengine.html#Type-enum">OpenGL</a> (accessible through <a href="qglwidget.html">QGLWidget</a>) and <a href="qpaintengine.html#Type-enum">PostScript</a> (accessible through QPSPrinter on X11). Additionally there is a raster-based paint engine that is a fallback for when an engine does not support a certain capability.</p>
<p>If one wants to use <a href="qpainter.html">QPainter</a> to draw to a different backend, such as PDF, one must subclass QPaintEngine and reimplement all its virtual functions. The QPaintEngine implementation is then made available by subclassing <a href="qpaintdevice.html">QPaintDevice</a> and reimplementing the virtual function <a href="qpaintdevice.html#paintEngine">QPaintDevice.paintEngine</a>().</p>
<p>QPaintEngine is created and owned by the <a href="qpaintdevice.html">QPaintDevice</a> that created it.</p>
<p>The big advantage of the QPaintEngine approach opposed to Qt 3's <a href="qpainter.html">QPainter</a>/QPaintDevice.cmd() approach is that it is now possible to adapt to multiple technologies on each platform and take advantage of each to the fullest.</p>
<p>See also <a href="qpainter.html">QPainter</a>, <a href="qpaintdevice.html#paintEngine">QPaintDevice.paintEngine</a>(), and <a href="paintsystem.html">The Paint System</a>.</p>
<hr /><h2>Type Documentation</h2><h3 class="fn"><a name="DirtyFlag-enum" />QPaintEngine.DirtyFlag</h3><table border="1" cellpadding="2" cellspacing="1" width="100%">
<tr>
<th width="25%">Constant</th>
<th width="15%">Value</th>
<th width="60%">Description</th>
</tr>
<tr>
<td valign="top"><tt>QPaintEngine.DirtyPen</tt></td>
<td align="center" valign="top"><tt>0x0001</tt></td>
<td valign="top">The pen is dirty and needs to be updated.</td>
</tr>
<tr>
<td valign="top"><tt>QPaintEngine.DirtyBrush</tt></td>
<td align="center" valign="top"><tt>0x0002</tt></td>
<td valign="top">The brush is dirty and needs to be updated.</td>
</tr>
<tr>
<td valign="top"><tt>QPaintEngine.DirtyBrushOrigin</tt></td>
<td align="center" valign="top"><tt>0x0004</tt></td>
<td valign="top">The brush origin is dirty and needs to updated.</td>
</tr>
<tr>
<td valign="top"><tt>QPaintEngine.DirtyFont</tt></td>
<td align="center" valign="top"><tt>0x0008</tt></td>
<td valign="top">The font is dirty and needs to be updated.</td>
</tr>
<tr>
<td valign="top"><tt>QPaintEngine.DirtyBackground</tt></td>
<td align="center" valign="top"><tt>0x0010</tt></td>
<td valign="top">The background is dirty and needs to be updated.</td>
</tr>
<tr>
<td valign="top"><tt>QPaintEngine.DirtyBackgroundMode</tt></td>
<td align="center" valign="top"><tt>0x0020</tt></td>
<td valign="top">The background mode is dirty and needs to be updated.</td>
</tr>
<tr>
<td valign="top"><tt>QPaintEngine.DirtyTransform</tt></td>
<td align="center" valign="top"><tt>0x0040</tt></td>
<td valign="top">The transform is dirty and needs to be updated.</td>
</tr>
<tr>
<td valign="top"><tt>QPaintEngine.DirtyClipRegion</tt></td>
<td align="center" valign="top"><tt>0x0080</tt></td>
<td valign="top">The clip region is dirty and needs to be updated.</td>
</tr>
<tr>
<td valign="top"><tt>QPaintEngine.DirtyClipPath</tt></td>
<td align="center" valign="top"><tt>0x0100</tt></td>
<td valign="top">The clip path is dirty and needs to be updated.</td>
</tr>
<tr>
<td valign="top"><tt>QPaintEngine.DirtyHints</tt></td>
<td align="center" valign="top"><tt>0x0200</tt></td>
<td valign="top">The render hints is dirty and needs to be updated.</td>
</tr>
<tr>
<td valign="top"><tt>QPaintEngine.DirtyCompositionMode</tt></td>
<td align="center" valign="top"><tt>0x0400</tt></td>
<td valign="top">The composition mode is dirty and needs to be updated.</td>
</tr>
<tr>
<td valign="top"><tt>QPaintEngine.DirtyClipEnabled</tt></td>
<td align="center" valign="top"><tt>0x0800</tt></td>
<td valign="top">Whether clipping is enabled or not is dirty and needs to be updated.</td>
</tr>
<tr>
<td valign="top"><tt>QPaintEngine.AllDirty</tt></td>
<td align="center" valign="top"><tt>0xffff</tt></td>
<td valign="top">Convenience enum used internally.</td>
</tr>
</table>
<br />
<br />
<p>These types are used by <a href="qpainter.html">QPainter</a> to trigger lazy updates of the various states in the <a href="qpaintengine.html">QPaintEngine</a> using <a href="qpaintengine.html#updateState">QPaintEngine.updateState</a>().</p>
<p>A paint engine must update every dirty state.</p>
<p>The DirtyFlags type is a typedef for <a href="qflags.html">QFlags</a>&lt;DirtyFlag&gt;. It stores an OR combination of DirtyFlag values.</p>
<h3 class="fn"><a name="PaintEngineFeature-enum" />QPaintEngine.PaintEngineFeature</h3><p>This enum is used to describe the features or capabilities that the paint engine has. If a feature is not supported by the engine, <a href="qpainter.html">QPainter</a> will do a best effort to emulate that feature through other means and pass on an alpha blended <a href="qimage.html">QImage</a> to the engine with the emulated results. Some features cannot be emulated: AlphaBlend and PorterDuff.</p>
<table border="1" cellpadding="2" cellspacing="1" width="100%">
<tr>
<th width="25%">Constant</th>
<th width="15%">Value</th>
<th width="60%">Description</th>
</tr>
<tr>
<td valign="top"><tt>QPaintEngine.PrimitiveTransform</tt></td>
<td align="center" valign="top"><tt>0x00000001</tt></td>
<td valign="top">The engine has support for transforming drawing primitives.</td>
</tr>
<tr>
<td valign="top"><tt>QPaintEngine.PatternTransform</tt></td>
<td align="center" valign="top"><tt>0x00000002</tt></td>
<td valign="top">The engine has support for transforming brush patterns.</td>
</tr>
<tr>
<td valign="top"><tt>QPaintEngine.PixmapTransform</tt></td>
<td align="center" valign="top"><tt>0x00000004</tt></td>
<td valign="top">The engine can transform pixmaps, including rotation and shearing.</td>
</tr>
<tr>
<td valign="top"><tt>QPaintEngine.PatternBrush</tt></td>
<td align="center" valign="top"><tt>0x00000008</tt></td>
<td valign="top">The engine is capable of rendering brushes with the brush patterns specified in <a href="qt.html#BrushStyle-enum">Qt.BrushStyle</a>.</td>
</tr>
<tr>
<td valign="top"><tt>QPaintEngine.LinearGradientFill</tt></td>
<td align="center" valign="top"><tt>0x00000010</tt></td>
<td valign="top">The engine supports linear gradient fills.</td>
</tr>
<tr>
<td valign="top"><tt>QPaintEngine.RadialGradientFill</tt></td>
<td align="center" valign="top"><tt>0x00000020</tt></td>
<td valign="top">The engine supports radial gradient fills.</td>
</tr>
<tr>
<td valign="top"><tt>QPaintEngine.ConicalGradientFill</tt></td>
<td align="center" valign="top"><tt>0x00000040</tt></td>
<td valign="top">The engine supports conical gradient fills.</td>
</tr>
<tr>
<td valign="top"><tt>QPaintEngine.AlphaBlend</tt></td>
<td align="center" valign="top"><tt>0x00000080</tt></td>
<td valign="top">The engine can alpha blend primitives.</td>
</tr>
<tr>
<td valign="top"><tt>QPaintEngine.PorterDuff</tt></td>
<td align="center" valign="top"><tt>0x00000100</tt></td>
<td valign="top">The engine supports Porter-Duff operations</td>
</tr>
<tr>
<td valign="top"><tt>QPaintEngine.PainterPaths</tt></td>
<td align="center" valign="top"><tt>0x00000200</tt></td>
<td valign="top">The engine has path support.</td>
</tr>
<tr>
<td valign="top"><tt>QPaintEngine.Antialiasing</tt></td>
<td align="center" valign="top"><tt>0x00000400</tt></td>
<td valign="top">The engine can use antialising to improve the appearance of rendered primitives.</td>
</tr>
<tr>
<td valign="top"><tt>QPaintEngine.BrushStroke</tt></td>
<td align="center" valign="top"><tt>0x00000800</tt></td>
<td valign="top"> </td>
</tr>
<tr>
<td valign="top"><tt>QPaintEngine.PaintOutsidePaintEvent</tt></td>
<td align="center" valign="top"><tt>0x20000000</tt></td>
<td valign="top">The engine is capable of painting outside of paint events.</td>
</tr>
<tr>
<td valign="top"><tt>QPaintEngine.AllFeatures</tt></td>
<td align="center" valign="top"><tt>0xffffffff</tt></td>
<td valign="top"> </td>
</tr>
</table>
<br />
<br />
<p>The PaintEngineFeatures type is a typedef for <a href="qflags.html">QFlags</a>&lt;PaintEngineFeature&gt;. It stores an OR combination of PaintEngineFeature values.</p>
<h3 class="fn"><a name="PolygonDrawMode-enum" />QPaintEngine.PolygonDrawMode</h3><table border="1" cellpadding="2" cellspacing="1" width="100%">
<tr>
<th width="25%">Constant</th>
<th width="15%">Value</th>
<th width="60%">Description</th>
</tr>
<tr>
<td valign="top"><tt>QPaintEngine.OddEvenMode</tt></td>
<td align="center" valign="top"><tt>0</tt></td>
<td valign="top">The polygon should be drawn using OddEven fill rule.</td>
</tr>
<tr>
<td valign="top"><tt>QPaintEngine.WindingMode</tt></td>
<td align="center" valign="top"><tt>1</tt></td>
<td valign="top">The polygon should be drawn using Winding fill rule.</td>
</tr>
<tr>
<td valign="top"><tt>QPaintEngine.ConvexMode</tt></td>
<td align="center" valign="top"><tt>2</tt></td>
<td valign="top">The polygon is a convex polygon and can be drawn using specialized algorithms where available.</td>
</tr>
<tr>
<td valign="top"><tt>QPaintEngine.PolylineMode</tt></td>
<td align="center" valign="top"><tt>3</tt></td>
<td valign="top">Only the outline of the polygon should be drawn.</td>
</tr>
</table>
<br />
<br />
<h3 class="fn"><a name="Type-enum" />QPaintEngine.Type</h3><table border="1" cellpadding="2" cellspacing="1" width="100%">
<tr>
<th width="25%">Constant</th>
<th width="15%">Value</th>
<th width="60%">Description</th>
</tr>
<tr>
<td valign="top"><tt>QPaintEngine.X11</tt></td>
<td align="center" valign="top"><tt>0</tt></td>
<td valign="top"> </td>
</tr>
<tr>
<td valign="top"><tt>QPaintEngine.Windows</tt></td>
<td align="center" valign="top"><tt>1</tt></td>
<td valign="top"> </td>
</tr>
<tr>
<td valign="top"><tt>QPaintEngine.MacPrinter</tt></td>
<td align="center" valign="top"><tt>4</tt></td>
<td valign="top"> </td>
</tr>
<tr>
<td valign="top"><tt>QPaintEngine.CoreGraphics</tt></td>
<td align="center" valign="top"><tt>3</tt></td>
<td valign="top">Mac OS X's Quartz2D (CoreGraphics)</td>
</tr>
<tr>
<td valign="top"><tt>QPaintEngine.QuickDraw</tt></td>
<td align="center" valign="top"><tt>2</tt></td>
<td valign="top">Mac OS X's older QuickDraw-based painting</td>
</tr>
<tr>
<td valign="top"><tt>QPaintEngine.QWindowSystem</tt></td>
<td align="center" valign="top"><tt>5</tt></td>
<td valign="top">Qtopia Core</td>
</tr>
<tr>
<td valign="top"><tt>QPaintEngine.PostScript</tt></td>
<td align="center" valign="top"><tt>6</tt></td>
<td valign="top"> </td>
</tr>
<tr>
<td valign="top"><tt>QPaintEngine.OpenGL</tt></td>
<td align="center" valign="top"><tt>7</tt></td>
<td valign="top"> </td>
</tr>
<tr>
<td valign="top"><tt>QPaintEngine.Picture</tt></td>
<td align="center" valign="top"><tt>8</tt></td>
<td valign="top"><a href="qpicture.html">QPicture</a> format</td>
</tr>
<tr>
<td valign="top"><tt>QPaintEngine.SVG</tt></td>
<td align="center" valign="top"><tt>9</tt></td>
<td valign="top">Scalable Vector Graphics XML format</td>
</tr>
<tr>
<td valign="top"><tt>QPaintEngine.Raster</tt></td>
<td align="center" valign="top"><tt>10</tt></td>
<td valign="top"> </td>
</tr>
<tr>
<td valign="top"><tt>QPaintEngine.User</tt></td>
<td align="center" valign="top"><tt>50</tt></td>
<td valign="top">First user type ID</td>
</tr>
<tr>
<td valign="top"><tt>QPaintEngine.MaxUser</tt></td>
<td align="center" valign="top"><tt>100</tt></td>
<td valign="top">Last user type ID</td>
</tr>
</table>
<br />
<br />
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QPaintEngine" />QPaintEngine.__init__ (<i>self</i>, <a href="qpaintengine-paintenginefeatures.html">PaintEngineFeatures</a>&#160;<i>features</i>&#160;=&#160;0)</h3><p>Creates a paint engine with the featureset specified by <i>caps</i>.</p>
<h3 class="fn"><a name="QPaintEngine-2" />QPaintEngine.__init__ (<i>self</i>, <a href="qpaintengine.html">QPaintEngine</a>)</h3><h3 class="fn"><a name="begin" />bool QPaintEngine.begin (<i>self</i>, <a href="qpaintdevice.html">QPaintDevice</a>&#160;<i>pdev</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Reimplement this function to initialise your paint engine when painting is to start on the paint device <i>pdev</i>. Return true if the initialization was successful; otherwise return false.</p>
<p>See also <a href="qpaintengine.html#end">end</a>() and <a href="qpaintengine.html#isActive">isActive</a>().</p>
<h3 class="fn"><a name="drawEllipse" />QPaintEngine.drawEllipse (<i>self</i>, <a href="qrectf.html">QRectF</a>&#160;<i>r</i>)</h3><p>Reimplement this function to draw the largest ellipse that can be contained within rectangle <i>rect</i>.</p>
<p>The default implementation calls <a href="qpaintengine.html#drawPolygon">drawPolygon</a>().</p>
<h3 class="fn"><a name="drawEllipse-2" />QPaintEngine.drawEllipse (<i>self</i>, <a href="qrect.html">QRect</a>&#160;<i>r</i>)</h3><p>This is an overloaded member function, provided for convenience.</p>
<p>The default implementation of this function calls the floating point version of this function</p>
<h3 class="fn"><a name="drawImage" />QPaintEngine.drawImage (<i>self</i>, <a href="qrectf.html">QRectF</a>&#160;<i>r</i>, <a href="qimage.html">QImage</a>&#160;<i>pm</i>, <a href="qrectf.html">QRectF</a>&#160;<i>sr</i>, <a href="qt-imageconversionflags.html">Qt.ImageConversionFlags</a>&#160;<i>flags</i>&#160;=&#160;Qt.AutoColor)</h3><p>Reimplement this function to draw the part of the <i>image</i> specified by the <i>sr</i> rectangle in the given <i>rectangle</i> using the given conversion flags <i>flags</i>, to convert it to a pixmap.</p>
<h3 class="fn"><a name="drawLines" />QPaintEngine.drawLines (<i>self</i>, <a href="qline.html">QLine</a>&#160;<i>lines</i>, int&#160;<i>lineCount</i>)</h3><p>The default implementation splits the list of lines in <i>lines</i> into <i>lineCount</i> separate calls to <a href="qpaintengine.html#drawPath">drawPath</a>() or <a href="qpaintengine.html#drawPolygon">drawPolygon</a>() depending on the feature set of the paint engine.</p>
<h3 class="fn"><a name="drawLines-2" />QPaintEngine.drawLines (<i>self</i>, <a href="qlinef.html">QLineF</a>&#160;<i>lines</i>, int&#160;<i>lineCount</i>)</h3><p>This is an overloaded member function, provided for convenience.</p>
<p>The default implementation converts the first <i>lineCount</i> lines in <i>lines</i> to a <a href="qlinef.html">QLineF</a> and calls the floating point version of this function.</p>
<h3 class="fn"><a name="drawPath" />QPaintEngine.drawPath (<i>self</i>, <a href="qpainterpath.html">QPainterPath</a>&#160;<i>path</i>)</h3><p>The default implementation ignores the <i>path</i> and does nothing.</p>
<h3 class="fn"><a name="drawPixmap" />QPaintEngine.drawPixmap (<i>self</i>, <a href="qrectf.html">QRectF</a>&#160;<i>r</i>, <a href="qpixmap.html">QPixmap</a>&#160;<i>pm</i>, <a href="qrectf.html">QRectF</a>&#160;<i>sr</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Reimplement this function to draw the part of the <i>pm</i> specified by the <i>sr</i> rectangle in the given <i>r</i>.</p>
<h3 class="fn"><a name="drawPoints" />QPaintEngine.drawPoints (<i>self</i>, <a href="qpointf.html">QPointF</a>&#160;<i>points</i>, int&#160;<i>pointCount</i>)</h3><p>Draws the first <i>pointCount</i> points in the buffer <i>points</i></p>
<h3 class="fn"><a name="drawPoints-2" />QPaintEngine.drawPoints (<i>self</i>, <a href="qpoint.html">QPoint</a>&#160;<i>points</i>, int&#160;<i>pointCount</i>)</h3><p>This is an overloaded member function, provided for convenience.</p>
<p>Draws the first <i>pointCount</i> points in the buffer <i>points</i></p>
<p>The default implementation converts the first <i>pointCount</i> QPoints in <i>points</i> to QPointFs and calls the floating point version of drawPoints.</p>
<h3 class="fn"><a name="drawPolygon" />QPaintEngine.drawPolygon (<i>self</i>, <a href="qpointf.html">QPointF</a>&#160;<i>points</i>, int&#160;<i>pointCount</i>, <a href="qpaintengine.html#PolygonDrawMode-enum">PolygonDrawMode</a>&#160;<i>mode</i>)</h3><p>Reimplement this virtual function to draw the polygon defined by the <i>pointCount</i> first points in <i>points</i>, using mode <i>mode</i>.</p>
<p>The default implementation of this function will try to use drawPath if the engine supports the feature <a href="qpaintengine.html#PaintEngineFeature-enum">QPaintEngine.PainterPaths</a> or try the float based drawPolygon() implementation if not.</p>
<h3 class="fn"><a name="drawPolygon-2" />QPaintEngine.drawPolygon (<i>self</i>, <a href="qpoint.html">QPoint</a>&#160;<i>points</i>, int&#160;<i>pointCount</i>, <a href="qpaintengine.html#PolygonDrawMode-enum">PolygonDrawMode</a>&#160;<i>mode</i>)</h3><p>This is an overloaded member function, provided for convenience.</p>
<p>Reimplement this virtual function to draw the polygon defined by the <i>pointCount</i> first points in <i>points</i>, using mode <i>mode</i>.</p>
<p>The default implementation of this function will try to use <a href="qpaintengine.html#drawPath">drawPath</a>() if the engine supports the feature <a href="qpaintengine.html#PaintEngineFeature-enum">QPaintEngine.PainterPaths</a> or try the int based <a href="qpaintengine.html#drawPolygon">drawPolygon</a>() implementation if not.</p>
<h3 class="fn"><a name="drawRects" />QPaintEngine.drawRects (<i>self</i>, <a href="qrect.html">QRect</a>&#160;<i>rects</i>, int&#160;<i>rectCount</i>)</h3><p>Draws the first <i>rectCount</i> rectangles in the buffer <i>rects</i>. The default implementation of this function calls <a href="qpaintengine.html#drawPath">drawPath</a>() or <a href="qpaintengine.html#drawPolygon">drawPolygon</a>() depending on the feature set of the paint engine.</p>
<h3 class="fn"><a name="drawRects-2" />QPaintEngine.drawRects (<i>self</i>, <a href="qrectf.html">QRectF</a>&#160;<i>rects</i>, int&#160;<i>rectCount</i>)</h3><p>This is an overloaded member function, provided for convenience.</p>
<p>The default implementation converts the first <i>rectCount</i> rectangles in the buffer <i>rects</i> to a <a href="qrectf.html">QRectF</a> and calls the floating point version of this function.</p>
<h3 class="fn"><a name="drawTextItem" />QPaintEngine.drawTextItem (<i>self</i>, <a href="qpointf.html">QPointF</a>&#160;<i>p</i>, <a href="qtextitem.html">QTextItem</a>&#160;<i>textItem</i>)</h3><p>This function draws the text item <i>textItem</i> at position <i>p</i>. The default implementation of this function converts the text to a <a href="qpainterpath.html">QPainterPath</a> and paints the resulting path.</p>
<h3 class="fn"><a name="drawTiledPixmap" />QPaintEngine.drawTiledPixmap (<i>self</i>, <a href="qrectf.html">QRectF</a>&#160;<i>r</i>, <a href="qpixmap.html">QPixmap</a>&#160;<i>pixmap</i>, <a href="qpointf.html">QPointF</a>&#160;<i>s</i>)</h3><p>Reimplement this function to draw the <i>pixmap</i> in the given <i>rect</i>, starting at the given <i>p</i>. The pixmap will be drawn repeatedly until the <i>rect</i> is filled.</p>
<h3 class="fn"><a name="end" />bool QPaintEngine.end (<i>self</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Reimplement this function to finish painting on the current paint device. Return true if painting was finished successfully; otherwise return false.</p>
<p>See also <a href="qpaintengine.html#begin">begin</a>() and <a href="qpaintengine.html#isActive">isActive</a>().</p>
<h3 class="fn"><a name="hasFeature" />bool QPaintEngine.hasFeature (<i>self</i>, <a href="qpaintengine-paintenginefeatures.html">PaintEngineFeatures</a>&#160;<i>feature</i>)</h3><p>Returns true if the paint engine supports the specified <i>feature</i>; otherwise returns false.</p>
<h3 class="fn"><a name="isActive" />bool QPaintEngine.isActive (<i>self</i>)</h3><p>Returns true if the paint engine is actively drawing; otherwise returns false.</p>
<p>See also <a href="qpaintengine.html#setActive">setActive</a>().</p>
<h3 class="fn"><a name="paintDevice" /><a href="qpaintdevice.html">QPaintDevice</a> QPaintEngine.paintDevice (<i>self</i>)</h3><p>Returns the engine that this engine is painting on, if painting is active; otherwise returns 0.</p>
<h3 class="fn"><a name="painter" /><a href="qpainter.html">QPainter</a> QPaintEngine.painter (<i>self</i>)</h3><p>Returns the paint engine's painter.</p>
<h3 class="fn"><a name="setActive" />QPaintEngine.setActive (<i>self</i>, bool&#160;<i>newState</i>)</h3><p>Sets the active state of the paint engine to <i>state</i>.</p>
<p>See also <a href="qpaintengine.html#isActive">isActive</a>().</p>
<h3 class="fn"><a name="setPaintDevice" />QPaintEngine.setPaintDevice (<i>self</i>, <a href="qpaintdevice.html">QPaintDevice</a>&#160;<i>device</i>)</h3><h3 class="fn"><a name="type" /><a href="qpaintengine.html#Type-enum">Type</a> QPaintEngine.type (<i>self</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Reimplement this function to return the paint engine <a href="qpaintengine.html#Type-enum">Type</a>.</p>
<h3 class="fn"><a name="updateState" />QPaintEngine.updateState (<i>self</i>, <a href="qpaintenginestate.html">QPaintEngineState</a>&#160;<i>state</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Reimplement this function to update the state of a paint engine.</p>
<p>When implemented, this function is responsible for checking the paint engine's current <i>state</i> and update the properties that are changed. Use the <a href="qpaintenginestate.html#state">QPaintEngineState.state</a>() function to find out which properties that must be updated, then use the corresponding <a href="qpaintenginestate.html#getfunction">get function</a> to retrieve the current values for the given properties.</p>
<p>See also <a href="qpaintenginestate.html">QPaintEngineState</a>.</p>
<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td width="25%">PyQt&#160;4.0.1 for X11</td><td align="center" width="50%">Copyright &#169; <a href="http://www.riverbankcomputing.com">Riverbank&#160;Computing&#160;Ltd</a> and <a href="http://www.trolltech.com">Trolltech&#160;AS</a> 2006</td><td align="right" width="25%">Qt&#160;4.1.4</td></tr></table></div></address></body></html>