⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qpainter-h.html

📁 qtopiaphone英文帮助,用于初学者和开发人员,初学者可以用来学习,开发人员可以用来资料查询.
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!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>  <font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" align="center" size=32>Qte</font></a></div></table><h1 align=center>qpainter.h</h1><br clear="all">This is the verbatim text of the qpainter.h include file.  It isprovided only for illustration; the copyrightremains with Trolltech.<hr><pre>/****************************************************************************** &#36;Id&#58; qt/src/kernel/qpainter.h   2.3.8   edited 2004-05-12 $**** 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_Hclass 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

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -