Changeset 61 for trunk/include/qregion.h


Ignore:
Timestamp:
Feb 6, 2006, 10:43:39 PM (20 years ago)
Author:
dmik
Message:

Implemented QRegion(..., QRegion::Eclipse) and QRegion(QPointArray &,...) constructors.
Improved Qt<->GPI region coordinates translation (it's now implicit), QRegion::handle() takes a height of the target devise as an argument (defaults to 0).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/qregion.h

    r8 r61  
    9494                        { return !(operator==(r)); }
    9595
    96 #if defined(Q_WS_WIN) || defined(Q_WS_PM)
    97     HRGN    handle() const { if (! data->rgn ) update(); return data->rgn; }
     96#if defined(Q_WS_WIN)
     97    HRGN    handle() const { return data->rgn; }
     98#elif defined(Q_WS_PM)   
     99    HRGN handle( int target_height = 0 ) const {
     100        if ( !data->rgn || data->hgt != target_height )
     101            updateHandle( target_height );
     102        return data->rgn;
     103    }
    98104#elif defined(Q_WS_X11)
    99105    Region handle() const { if(!data->rgn) updateX11Region(); return data->rgn; }
     
    116122    QRegion winCombine( const QRegion &, int ) const;
    117123#elif defined(Q_WS_PM)
     124    QRegion( HRGN hrgn, int target_height );
    118125    QRegion pmCombine( const QRegion &, int ) const;
    119     void update() const;
     126    void updateHandle( int target_height ) const;
    120127#elif defined(Q_WS_X11)
    121128    void updateX11Region() const;
     
    125132    void    exec( const QByteArray &, int ver = 0 );
    126133    struct QRegionData : public QShared {
    127 #if defined(Q_WS_WIN) || defined(Q_WS_PM)
     134#if defined(Q_WS_WIN)
    128135        HRGN   rgn;
     136#elif defined(Q_WS_PM)
     137        HRGN rgn;
     138        int hgt;
    129139#elif defined(Q_WS_X11)
    130140        Region rgn;
     
    150160    friend class QETWidget;
    151161    friend class QPainter;
    152     friend void qt_set_paintevent_clipping( QPaintDevice*, const QRegion& );
    153162#endif
    154163
Note: See TracChangeset for help on using the changeset viewer.