File: qpainter-h.html

package info (click to toggle)
qt-embedded 2.3.2-3
  • links: PTS
  • area: main
  • in suites: woody
  • size: 68,608 kB
  • ctags: 45,998
  • sloc: cpp: 276,654; ansic: 71,987; makefile: 29,074; sh: 12,305; yacc: 2,465; python: 1,863; perl: 481; lex: 480; xml: 68; lisp: 15
file content (691 lines) | stat: -rw-r--r-- 22,458 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
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>
Qt Toolkit - qpainter.h include file
</title><style type="text/css"><!--
h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }body { background: white; color: black; }
--></style>
</head><body bgcolor="#ffffff">

<table width="100%">
<tr><td><a href="index.html">
<img width="100" height="100" src="qtlogo.png"
alt="Home" border="0"><img width="100"
height="100" src="face.png" alt="Home" border="0">
</a><td valign=top><div align=right><img src="dochead.png" width="472" height="27"><br>
<a href="classes.html"><b>Classes</b></a>
-<a href="annotated.html">Annotated</a>
- <a href="hierarchy.html">Tree</a>
-<a href="functions.html">Functions</a>
-<a href="index.html">Home</a>
-<a href="topicals.html"><b>Structure</b></a>
</div>
</table>

<h1 align=center>qpainter.h</h1><br clear="all">
This is the verbatim text of the qpainter.h include file.  It is
provided only for illustration; the copyright
remains with Trolltech.
<hr>
<pre>
/****************************************************************************
** &#36;Id&#58; qt/src/kernel/qpainter.h   2.3.2   edited 2001-04-25 $
**
** Definition of QPainter class
**
** Created : 940112
**
** Copyright (C) 1992-2000 Trolltech AS.  All rights reserved.
**
** This file is part of the kernel module of the Qt GUI Toolkit.
**
** This file may be distributed under the terms of the Q Public License
** as defined by Trolltech AS of Norway and appearing in the file
** LICENSE.QPL included in the packaging of this file.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
** licenses may use this file in accordance with the Qt Commercial License
** Agreement provided with the Software.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
**   information about Qt Commercial License Agreements.
** See http://www.trolltech.com/qpl/ for QPL licensing information.
** See http://www.trolltech.com/gpl/ for GPL licensing information.
**
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/

#ifndef QPAINTER_H
#define QPAINTER_H


#ifndef QT_H
#include "qpaintdevice.h"
#include "qcolor.h"
#include "qfontmetrics.h"
#include "qfontinfo.h"
#include "qregion.h"
#include "qpen.h"
#include "qbrush.h"
#include "qpointarray.h"
#include "qwmatrix.h"
#endif // QT_H

class QGfx;
class <a href="qtextcodec.html">QTextCodec</a>;


class Q_EXPORT <a href="qpainter.html">QPainter</a> : public <a href="qt.html">Qt</a>
{
public:
    QPainter();
    QPainter( const QPaintDevice * );
    QPainter( const QPaintDevice *, const QWidget * );
   ~QPainter();

    bool        begin( const QPaintDevice * );
    bool        begin( const QPaintDevice *, const QWidget * );
    bool        end();
    QPaintDevice *device() const;

#ifdef _WS_QWS_
    QGfx * internalGfx();
#endif

    static void redirect( QPaintDevice *pdev, QPaintDevice *replacement );

    bool        isActive() const;

    void        flush();
    void        save();
    void        restore();

  // Drawing tools

    QFontMetrics fontMetrics()  const;
    QFontInfo    fontInfo()     const;

    const QFont &amp;font()         const;
    void        setFont( const QFont &amp; );
    const QPen &amp;pen()           const;
    void        setPen( const QPen &amp; );
    void        setPen( PenStyle );
    void        setPen( const QColor &amp; );
    const QBrush &amp;brush()       const;
    void        setBrush( const QBrush &amp; );
    void        setBrush( BrushStyle );
    void        setBrush( const QColor &amp; );
    QPoint      pos() const;

  // Drawing attributes/modes

    const QColor &amp;backgroundColor() const;
    void        setBackgroundColor( const QColor &amp; );
    BGMode      backgroundMode() const;
    void        setBackgroundMode( BGMode );
    RasterOp    rasterOp()      const;
    void        setRasterOp( RasterOp );
    const QPoint &amp;brushOrigin() const;
    void        setBrushOrigin( int x, int y );
    void        setBrushOrigin( const QPoint &amp; );

  // Scaling and transformations

//    PaintUnit unit()         const;           // get set painter unit
//    void      setUnit( PaintUnit );           // NOT IMPLEMENTED!!!

    bool        hasViewXForm() const;
    bool        hasWorldXForm() const;

#ifndef QT_NO_TRANSFORMATIONS
    void        setViewXForm( bool );           // set xform on/off
    QRect       window()       const;           // get window
    void        setWindow( const QRect &amp; );     // set window
    void        setWindow( int x, int y, int w, int h );
    QRect       viewport()   const;             // get viewport
    void        setViewport( const QRect &amp; );   // set viewport
    void        setViewport( int x, int y, int w, int h );

    void        setWorldXForm( bool );          // set world xform on/off
    const QWMatrix &amp;worldMatrix() const;        // get/set world xform matrix
    void        setWorldMatrix( const QWMatrix &amp;, bool combine=FALSE );

    void        saveWorldMatrix();
    void        restoreWorldMatrix();

    void        scale( double sx, double sy );
    void        shear( double sh, double sv );
    void        rotate( double a );
#endif
    void        translate( double dx, double dy );
    void        resetXForm();

    QPoint      xForm( const QPoint &amp; ) const;  // map virtual -&gt; device
    QRect       xForm( const QRect &amp; )  const;
    QPointArray xForm( const QPointArray &amp; ) const;
    QPointArray xForm( const QPointArray &amp;, int index, int npoints ) const;
    QPoint      xFormDev( const QPoint &amp; ) const; // map device -&gt; virtual
    QRect       xFormDev( const QRect &amp; )  const;
    QPointArray xFormDev( const QPointArray &amp; ) const;
    QPointArray xFormDev( const QPointArray &amp;, int index, int npoints ) const;

  // Clipping

    void        setClipping( bool );            // set clipping on/off
    bool        hasClipping() const;
    const QRegion &amp;clipRegion() const;
    void        setClipRect( const QRect &amp; );   // set clip rectangle
    void        setClipRect( int x, int y, int w, int h );
    void        setClipRegion( const QRegion &amp;);// set clip region

  // Graphics drawing functions

    void        drawPoint( int x, int y );
    void        drawPoint( const QPoint &amp; );
    void        drawPoints( const QPointArray&amp; a,
                            int index=0, int npoints=-1 );
    void        moveTo( int x, int y );
    void        moveTo( const QPoint &amp; );
    void        lineTo( int x, int y );
    void        lineTo( const QPoint &amp; );
    void        drawLine( int x1, int y1, int x2, int y2 );
    void        drawLine( const QPoint &amp;, const QPoint &amp; );
    void        drawRect( int x, int y, int w, int h );
    void        drawRect( const QRect &amp; );
    void        drawWinFocusRect( int x, int y, int w, int h );
    void        drawWinFocusRect( int x, int y, int w, int h,
                                  const QColor &amp;bgColor );
    void        drawWinFocusRect( const QRect &amp; );
    void        drawWinFocusRect( const QRect &amp;,
                                  const QColor &amp;bgColor );
    void        drawRoundRect( int x, int y, int w, int h, int, int );
    void        drawRoundRect( const QRect &amp;, int, int );
    void        drawRoundRect( int x, int y, int w, int h );
    void        drawRoundRect( const QRect &amp; );
    void        drawEllipse( int x, int y, int w, int h );
    void        drawEllipse( const QRect &amp; );
    void        drawArc( int x, int y, int w, int h, int a, int alen );
    void        drawArc( const QRect &amp;, int a, int alen );
    void        drawPie( int x, int y, int w, int h, int a, int alen );
    void        drawPie( const QRect &amp;, int a, int alen );
    void        drawChord( int x, int y, int w, int h, int a, int alen );
    void        drawChord( const QRect &amp;, int a, int alen );
    void        drawLineSegments( const QPointArray &amp;,
                                  int index=0, int nlines=-1 );
    void        drawPolyline( const QPointArray &amp;,
                              int index=0, int npoints=-1 );
    void        drawPolygon( const QPointArray &amp;, bool winding=FALSE,
                             int index=0, int npoints=-1 );
    void        drawQuadBezier( const QPointArray &amp;, int index=0 );
    void        drawPixmap( int x, int y, const QPixmap &amp;,
                            int sx=0, int sy=0, int sw=-1, int sh=-1 );
    void        drawPixmap( const QPoint &amp;, const QPixmap &amp;,
                            const QRect &amp;sr );
    void        drawPixmap( const QPoint &amp;, const QPixmap &amp; );
    void        drawImage( int x, int y, const QImage &amp;,
                           int sx=0, int sy=0, int sw=-1, int sh=-1 );
    void        drawImage( const QPoint &amp;, const QImage &amp;, const QRect &amp;sr );
    void        drawImage( const QPoint &amp;, const QImage &amp; );
    void        drawImage( int x, int y, const QImage &amp;,
                           int sx, int sy, int sw, int sh, int conversion_flags );
    void        drawImage( const QPoint &amp;, const QImage &amp;, const QRect &amp;sr, int conversion_flags );
    void        drawImage( const QPoint &amp;, const QImage &amp;, int conversion_flags );
    void        drawTiledPixmap( int x, int y, int w, int h, const QPixmap &amp;,
                                 int sx=0, int sy=0 );
    void        drawTiledPixmap( const QRect &amp;, const QPixmap &amp;,
                                 const QPoint &amp; );
    void        drawTiledPixmap( const QRect &amp;, const QPixmap &amp; );
#ifndef QT_NO_PICTURE
    void        drawPicture( const QPicture &amp; );
#endif

    void        fillRect( int x, int y, int w, int h, const QBrush &amp; );
    void        fillRect( const QRect &amp;, const QBrush &amp; );
    void        eraseRect( int x, int y, int w, int h );
    void        eraseRect( const QRect &amp; );

  // Text drawing functions

    void        drawText( int x, int y, const QString &amp;, int len = -1 );
    void        drawText( const QPoint &amp;, const QString &amp;, int len = -1 );
    void        drawText( int x, int y, int w, int h, int flags,
                          const QString&amp;, int len = -1, QRect *br=0,
                          char **internal=0 );
    void        drawText( const QRect &amp;, int flags,
                          const QString&amp;, int len = -1, QRect *br=0,
                          char **internal=0 );

    //#####    void     drawText( const QPoint &amp;, const QString &amp;, int flags, int rotation = 0);

  // Text drawing functions

    QRect       boundingRect( int x, int y, int w, int h, int flags,
                              const QString&amp;, int len = -1, char **intern=0 );
    QRect       boundingRect( const QRect &amp;, int flags,
                              const QString&amp;, int len = -1, char **intern=0 );

    int         tabStops() const;
    void        setTabStops( int );
    int        *tabArray() const;
    void        setTabArray( int * );

    // Other functions

#if defined(_WS_WIN_)
    HDC         handle() const;
#elif defined(_WS_X11_)
    HANDLE      handle() const;
#endif


    static void initialize();
    static void cleanup();

private:
    void        init();
    void        updateFont();
    void        updatePen();
    void        updateBrush();
#ifndef QT_NO_TRANSFORMATIONS
    void        updateXForm();
    void        updateInvXForm();
#endif
    void        map( int, int, int *rx, int *ry ) const;
    void        map( int, int, int, int, int *, int *, int *, int * ) const;
    void        mapInv( int, int, int *, int * ) const;
    void        mapInv( int, int, int, int, int *, int *, int *, int * ) const;
    void        drawPolyInternal( const QPointArray &amp;, bool close=TRUE );
    void        drawWinFocusRect( int x, int y, int w, int h, bool xorPaint,
                                  const QColor &amp;penColor );

    enum { IsActive=0x01, ExtDev=0x02, IsStartingUp=0x04, NoCache=0x08,
           VxF=0x10, WxF=0x20, ClipOn=0x40, SafePolygon=0x80, MonoDev=0x100,
           DirtyFont=0x200, DirtyPen=0x400, DirtyBrush=0x800,
           RGBColor=0x1000, FontMet=0x2000, FontInf=0x4000, CtorBegin=0x8000,
           UsePrivateCx=0x10000, VolatileDC=0x20000, PaintEventClipOn=0x40000 };
    uint        flags;
    bool        testf( uint b ) const { return (flags&amp;b)!=0; }
    void        setf( uint b )  { flags |= b; }
    void        setf( uint b, bool v );
    void        clearf( uint b )        { flags &amp;= (uint)(~b); }
    void        fix_neg_rect( int *x, int *y, int *w, int *h );

    QPaintDevice *pdev;
    QColor      bg_col;
    uchar       bg_mode;
    uchar       rop;
    uchar       pu;
    QPoint      bro;
    QFont       cfont;
    QPen        cpen;
    QBrush      cbrush;
    QRegion     crgn;
    int         tabstops;
    int        *tabarray;
    int         tabarraylen;

    // Transformations
#ifndef QT_NO_TRANSFORMATIONS
    QCOORD      wx, wy, ww, wh;
    QCOORD      vx, vy, vw, vh;
    QWMatrix    wxmat;

    // Cached composition (and inverse) of transformations
    QWMatrix    xmat;
    QWMatrix    ixmat;



    double      m11() const { return xmat.m11(); }
    double      m12() const { return xmat.m12(); }
    double      m21() const { return xmat.m21(); }
    double      m22() const { return xmat.m22(); }
    double      dx() const { return xmat.dx(); }
    double      dy() const { return xmat.dy(); }
    double      im11() const { return ixmat.m11(); }
    double      im12() const { return ixmat.m12(); }
    double      im21() const { return ixmat.m21(); }
    double      im22() const { return ixmat.m22(); }
    double      idx() const { return ixmat.dx(); }
    double      idy() const { return ixmat.dy(); }

    int         txop;
    bool        txinv;

#else
    // even without transformations we still have translations
    int         xlatex;
    int         xlatey;
#endif

    void       *penRef;                         // pen cache ref
    void       *brushRef;                       // brush cache ref
    void       *ps_stack;
    void       *wm_stack;
    void        killPStack();

protected:
#if defined(_WS_WIN_)
    QT_WIN_PAINTER_MEMBERS
#elif defined(_WS_X11_)
    Display    *dpy;                            // current display
    WId         hd;                             // handle to drawable
    GC          gc;                             // graphics context (standard)
    GC          gc_brush;                       // graphics contect for brush
    QPoint      curPt;                          // current point
#elif defined(_WS_MAC_)
    int penx;
    int peny;
    void * hd;
#elif defined(_WS_QWS_)
    QGfx * gfx;
#endif
    friend class QFontMetrics;
    friend class QFontInfo;
    friend void qt_format_text( const QFontMetrics&amp; fm, int x, int y, int w, int h,
                     int tf, const QString&amp; str, int len, QRect *brect,
                     int tabstops, int* tabarray, int tabarraylen,
                     char **internal, QPainter* painter );

private:        // Disabled copy constructor and operator=
#if defined(Q_DISABLE_COPY)
    QPainter( const QPainter &amp; );
    QPainter &amp;operator=( const QPainter &amp; );
#endif
};


/*****************************************************************************
  QPainter member functions
 *****************************************************************************/

inline QPaintDevice *QPainter::device() const
{
    return pdev;
}

inline bool QPainter::isActive() const
{
    return testf(IsActive);
}

inline const QFont &amp;QPainter::font() const
{
    return cfont;
}

inline const QPen &amp;QPainter::pen() const
{
    return cpen;
}

inline const QBrush &amp;QPainter::brush() const
{
    return cbrush;
}

/*
inline PaintUnit QPainter::unit() const
{
    return (PaintUnit)pu;
}
*/

inline const QColor &amp;QPainter::backgroundColor() const
{
    return bg_col;
}

inline Qt::BGMode QPainter::backgroundMode() const
{
    return (BGMode)bg_mode;
}

inline Qt::RasterOp QPainter::rasterOp() const
{
    return (RasterOp)rop;
}

inline const QPoint &amp;QPainter::brushOrigin() const
{
    return bro;
}

inline bool QPainter::hasViewXForm() const
{
#ifndef QT_NO_TRANSFORMATIONS
    return testf(VxF);
#else
    return xlatex || xlatey;
#endif
}

inline bool QPainter::hasWorldXForm() const
{
#ifndef QT_NO_TRANSFORMATIONS
    return testf(WxF);
#else
    return xlatex || xlatey;
#endif
}

inline bool QPainter::hasClipping() const
{
    return testf(ClipOn);
}

inline const QRegion &amp;QPainter::clipRegion() const
{
    return crgn;
}

inline int QPainter::tabStops() const
{
    return tabstops;
}

inline int *QPainter::tabArray() const
{
    return tabarray;
}

#if defined(_WS_WIN_)
inline HDC QPainter::handle() const
{
    return hdc;
}
#elif defined(_WS_X11_)
inline HANDLE QPainter::handle() const
{
    return hd;
}
#endif

inline void QPainter::setBrushOrigin( const QPoint &amp;p )
{
    setBrushOrigin( p.x(), p.y() );
}

#ifndef QT_NO_TRANSFORMATIONS
inline void QPainter::setWindow( const QRect &amp;r )
{
    setWindow( r.x(), r.y(), r.width(), r.height() );
}

inline void QPainter::setViewport( const QRect &amp;r )
{
    setViewport( r.x(), r.y(), r.width(), r.height() );
}
#endif

inline void QPainter::setClipRect( int x, int y, int w, int h )
{
    setClipRect( QRect(x,y,w,h) );
}

inline void QPainter::drawPoint( const QPoint &amp;p )
{
    drawPoint( p.x(), p.y() );
}

inline void QPainter::moveTo( const QPoint &amp;p )
{
    moveTo( p.x(), p.y() );
}

inline void QPainter::lineTo( const QPoint &amp;p )
{
    lineTo( p.x(), p.y() );
}

inline void QPainter::drawLine( const QPoint &amp;p1, const QPoint &amp;p2 )
{
    drawLine( p1.x(), p1.y(), p2.x(), p2.y() );
}

inline void QPainter::drawRect( const QRect &amp;r )
{
    drawRect( r.x(), r.y(), r.width(), r.height() );
}

inline void QPainter::drawWinFocusRect( const QRect &amp;r )
{
    drawWinFocusRect( r.x(), r.y(), r.width(), r.height() );
}

inline void QPainter::drawWinFocusRect( const QRect &amp;r,const QColor &amp;penColor )
{
    drawWinFocusRect( r.x(), r.y(), r.width(), r.height(), penColor );
}

inline void QPainter::drawRoundRect( const QRect &amp;r, int xRnd, int yRnd )
{
    drawRoundRect( r.x(), r.y(), r.width(), r.height(), xRnd, yRnd );
}

inline void QPainter::drawRoundRect( const QRect &amp;r )
{
    // ### Qt 3.0 make one func. with def. args.
    drawRoundRect( r.x(), r.y(), r.width(), r.height(), 25, 25 );
}

inline void QPainter::drawRoundRect( int x, int y, int w, int h )
{
    // ### Qt 3.0 make one func. with def. args.
    drawRoundRect( x, y, w, h, 25, 25 );
}




inline void QPainter::drawEllipse( const QRect &amp;r )
{
    drawEllipse( r.x(), r.y(), r.width(), r.height() );
}

inline void QPainter::drawArc( const QRect &amp;r, int a, int alen )
{
    drawArc( r.x(), r.y(), r.width(), r.height(), a, alen );
}

inline void QPainter::drawPie( const QRect &amp;r, int a, int alen )
{
    drawPie( r.x(), r.y(), r.width(), r.height(), a, alen );
}

inline void QPainter::drawChord( const QRect &amp;r, int a, int alen )
{
    drawChord( r.x(), r.y(), r.width(), r.height(), a, alen );
}

inline void QPainter::drawPixmap( const QPoint &amp;p, const QPixmap &amp;pm,
                                  const QRect &amp;sr )
{
    drawPixmap( p.x(), p.y(), pm, sr.x(), sr.y(), sr.width(), sr.height() );
}

inline void QPainter::drawImage( const QPoint &amp;p, const QImage &amp;pm,
                                 const QRect &amp;sr )
{
    drawImage( p.x(), p.y(), pm, sr.x(), sr.y(), sr.width(), sr.height() );
}

inline void QPainter::drawTiledPixmap( const QRect &amp;r, const QPixmap &amp;pm,
                                       const QPoint &amp;sp )
{
    drawTiledPixmap( r.x(), r.y(), r.width(), r.height(), pm, sp.x(), sp.y() );
}

inline void QPainter::drawTiledPixmap( const QRect &amp;r, const QPixmap &amp;pm )
{
    drawTiledPixmap( r.x(), r.y(), r.width(), r.height(), pm, 0, 0 );
}

inline void QPainter::fillRect( const QRect &amp;r, const QBrush &amp;brush )
{
    fillRect( r.x(), r.y(), r.width(), r.height(), brush );
}

inline void QPainter::eraseRect( int x, int y, int w, int h )
{
    fillRect( x, y, w, h, backgroundColor() );
}

inline void QPainter::eraseRect( const QRect &amp;r )
{
    fillRect( r.x(), r.y(), r.width(), r.height(), backgroundColor() );
}

inline void QPainter::drawText( const QPoint &amp;p, const QString &amp;s, int len )
{
    drawText( p.x(), p.y(), s, len );
}

inline void QPainter::drawText( const QRect &amp;r, int tf,
                                const QString&amp; str, int len, QRect *br, char **i )
{
    drawText( r.x(), r.y(), r.width(), r.height(), tf, str, len, br, i );
}

inline QRect QPainter::boundingRect( const QRect &amp;r, int tf,
                                     const QString&amp; str, int len, char **i )
{
    return boundingRect( r.x(), r.y(), r.width(), r.height(), tf, str, len,
                         i );
}

#if defined(_WS_WIN_)
inline void *QPainter::textMetric()
{
    if ( testf(DirtyFont) )
        updateFont();
    return textmet;
}
#endif

#if defined(_WS_QWS_)
inline QGfx * QPainter::internalGfx()
{
    return gfx;
}
#endif

#endif // QPAINTER_H

</pre>
<p><address><hr><div align="center">
<table width="100%" cellspacing="0" border="0"><tr>
<td>Copyright  2001 Trolltech<td><a href="http://www.trolltech.com/trademarks.html">Trademarks</a>
<td align="right"><div align="right">Qt version 2.3.2</div>
</table></div></address></body></html>