bitBlt -> QPainter::drawPixmap

svn path=/trunk/playground/graphics/okular/; revision=556580
remotes/origin/old/work/newpageview
Pino Toscano 20 years ago
parent 9385667f6c
commit 378fa13c90
  1. 6
      ui/presentationwidget.cpp

@ -370,6 +370,7 @@ void PresentationWidget::paintEvent( QPaintEvent * pe )
// blit the pixmap to the screen // blit the pixmap to the screen
QVector<QRect> allRects = pe->region().rects(); QVector<QRect> allRects = pe->region().rects();
uint numRects = allRects.count(); uint numRects = allRects.count();
QPainter painter( this );
for ( uint i = 0; i < numRects; i++ ) for ( uint i = 0; i < numRects; i++ )
{ {
const QRect & r = allRects[i]; const QRect & r = allRects[i];
@ -393,12 +394,13 @@ void PresentationWidget::paintEvent( QPaintEvent * pe )
// finally blit the pixmap to the screen // finally blit the pixmap to the screen
pixPainter.end(); pixPainter.end();
bitBlt( this, r.topLeft(), &backPixmap, backPixmap.rect() ); painter.drawPixmap( r.topLeft(), backPixmap, backPixmap.rect() );
} else } else
#endif #endif
// copy the rendered pixmap to the screen // copy the rendered pixmap to the screen
bitBlt( this, r.topLeft(), &m_lastRenderedPixmap, r ); painter.drawPixmap( r.topLeft(), m_lastRenderedPixmap, r );
} }
painter.end();
} }
// </widget events> // </widget events>

Loading…
Cancel
Save