本文整理汇总了C++中QScreen::blit方法的典型用法代码示例。如果您正苦于以下问题:C++ QScreen::blit方法的具体用法?C++ QScreen::blit怎么用?C++ QScreen::blit使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QScreen
的用法示例。
在下文中一共展示了QScreen::blit方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: blit
void QMultiScreen::blit(QWSWindow *bs, const QRegion &clip)
{
const int n = d_ptr->screens.size();
for (int i = 0; i < n; ++i) {
QScreen *screen = d_ptr->screens.at(i);
const QRegion r = clip & screen->region();
if (r.isEmpty())
continue;
screen->blit(bs, r);
}
}
示例2: flush
void QWSWindowSurface::flush(QWidget *widget, const QRegion ®ion,
const QPoint &offset)
{
const QWidget *win = window();
if (!win)
return;
#ifndef QT_NO_GRAPHICSVIEW
QWExtra *extra = win->d_func()->extra;
if (extra && extra->proxyWidget)
return;
#endif //QT_NO_GRAPHICSVIEW
Q_UNUSED(offset);
const bool opaque = isOpaque();
#ifdef QT_QWS_DISABLE_FLUSHCLIPPING
QRegion toFlush = region;
#else
QRegion toFlush = region & d_ptr->clip;
#endif
if (!toFlush.isEmpty()) {
flushUpdate(widget, toFlush, QPoint(0, 0));
QPoint globalZero = win->mapToGlobal(QPoint(0, 0));
toFlush.translate(globalZero);
#ifdef QT_QWS_CLIENTBLIT
bool needRepaint = true;
if (opaque) {
QScreen* widgetScreen = getScreen(widget);
if (widgetScreen->supportsBlitInClients()) {
QWSDisplay::grab();
if(directRegion().intersected(toFlush) == toFlush) {
QPoint translate = -globalZero + painterOffset() + geometry().topLeft();
QRegion flushRegion = toFlush.translated(translate);
widgetScreen->blit(image(), geometry().topLeft(), flushRegion);
widgetScreen->setDirty(toFlush.boundingRect());
needRepaint = false;
}
QWSDisplay::ungrab();
}
}
if(needRepaint)
#endif
win->qwsDisplay()->repaintRegion(winId(), win->windowFlags(), opaque, toFlush);
}
}