Changeset View
Changeset View
Standalone View
Standalone View
scene_qpainter.cpp
Show First 20 Lines • Show All 247 Lines • ▼ Show 20 Line(s) | |||||
248 | } | 248 | } | ||
249 | 249 | | |||
250 | static void paintSubSurface(QPainter *painter, const QPoint &pos, QPainterWindowPixmap *pixmap) | 250 | static void paintSubSurface(QPainter *painter, const QPoint &pos, QPainterWindowPixmap *pixmap) | ||
251 | { | 251 | { | ||
252 | QPoint p = pos; | 252 | QPoint p = pos; | ||
253 | if (!pixmap->subSurface().isNull()) { | 253 | if (!pixmap->subSurface().isNull()) { | ||
254 | p += pixmap->subSurface()->position(); | 254 | p += pixmap->subSurface()->position(); | ||
255 | } | 255 | } | ||
256 | painter->drawImage(p, pixmap->image()); | 256 | | ||
257 | painter->drawImage(QRect(pos, pixmap->size()), pixmap->image()); | ||||
257 | const auto &children = pixmap->children(); | 258 | const auto &children = pixmap->children(); | ||
258 | for (auto it = children.begin(); it != children.end(); ++it) { | 259 | for (auto it = children.begin(); it != children.end(); ++it) { | ||
259 | auto pixmap = static_cast<QPainterWindowPixmap*>(*it); | 260 | auto pixmap = static_cast<QPainterWindowPixmap*>(*it); | ||
260 | if (pixmap->subSurface().isNull() || pixmap->subSurface()->surface().isNull() || !pixmap->subSurface()->surface()->isMapped()) { | 261 | if (pixmap->subSurface().isNull() || pixmap->subSurface()->surface().isNull() || !pixmap->subSurface()->surface()->isMapped()) { | ||
261 | continue; | 262 | continue; | ||
262 | } | 263 | } | ||
263 | paintSubSurface(painter, p, pixmap); | 264 | paintSubSurface(painter, p, pixmap); | ||
264 | } | 265 | } | ||
▲ Show 20 Lines • Show All 416 Lines • Show Last 20 Lines |