Changeset 9383 in ntrip for trunk/BNC/qwt/qwt_panner.cpp
- Timestamp:
- Mar 19, 2021, 9:15:03 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/qwt/qwt_panner.cpp
r8127 r9383 129 129 \param modifiers Keyboard modifiers 130 130 */ 131 void QwtPanner::setAbortKey( int key, 131 void QwtPanner::setAbortKey( int key, 132 132 Qt::KeyboardModifiers modifiers ) 133 133 { … … 137 137 138 138 //! Get the abort key and modifiers 139 void QwtPanner::getAbortKey( int &key, 139 void QwtPanner::getAbortKey( int &key, 140 140 Qt::KeyboardModifiers &modifiers ) const 141 141 { … … 248 248 fill the empty spaces by the background of the parent widget. 249 249 250 \param pePaint event251 */ 252 void QwtPanner::paintEvent( QPaintEvent * pe)250 \param event Paint event 251 */ 252 void QwtPanner::paintEvent( QPaintEvent *event ) 253 253 { 254 254 int dx = d_data->pos.x() - d_data->initialPos.x(); 255 255 int dy = d_data->pos.y() - d_data->initialPos.y(); 256 256 257 QRect r( 0, 0, d_data->pixmap.width(), d_data->pixmap.height() ); 258 r.moveCenter( QPoint( r.center().x() + dx, r.center().y() + dy ) ); 259 260 QPixmap pm( size() ); 257 QRectF r; 258 r.setSize( d_data->pixmap.size() ); 259 #if QT_VERSION >= 0x050000 260 r.setSize( r.size() / d_data->pixmap.devicePixelRatio() ); 261 #endif 262 r.moveCenter( QPointF( r.center().x() + dx, r.center().y() + dy ) ); 263 264 QPixmap pm = QwtPainter::backingStore( this, size() ); 261 265 QwtPainter::fillPixmap( parentWidget(), pm ); 262 266 … … 267 271 QPixmap masked = d_data->pixmap; 268 272 masked.setMask( d_data->contentsMask ); 269 painter.drawPixmap( r , masked );273 painter.drawPixmap( r.toRect(), masked ); 270 274 } 271 275 else 272 276 { 273 painter.drawPixmap( r , d_data->pixmap );277 painter.drawPixmap( r.toRect(), d_data->pixmap ); 274 278 } 275 279 … … 280 284 281 285 painter.begin( this ); 282 painter.setClipRegion( pe->region() );286 painter.setClipRegion( event->region() ); 283 287 painter.drawPixmap( 0, 0, pm ); 284 288 }
Note:
See TracChangeset
for help on using the changeset viewer.