diff options
Diffstat (limited to 'src/openvg')
-rw-r--r-- | src/openvg/qpaintengine_vg.cpp | 16 | ||||
-rw-r--r-- | src/openvg/qpixmapdata_vg_p.h | 6 |
2 files changed, 11 insertions, 11 deletions
diff --git a/src/openvg/qpaintengine_vg.cpp b/src/openvg/qpaintengine_vg.cpp index 047d9d8..75b7fa5 100644 --- a/src/openvg/qpaintengine_vg.cpp +++ b/src/openvg/qpaintengine_vg.cpp @@ -1753,13 +1753,13 @@ void QVGPaintEngine::clip(const QRect &rect, Qt::ClipOperation op) // QRegion copy on the heap for the test if we can. QRegion clip = d->systemClip; // Reference-counted, no alloc. QRect clipRect; - if (clip.numRects() == 1) { + if (clip.rectCount() == 1) { clipRect = clip.boundingRect().intersected(r); } else if (clip.isEmpty()) { clipRect = r; } else { clip = clip.intersect(r); - if (clip.numRects() != 1) { + if (clip.rectCount() != 1) { d->maskValid = false; d->maskIsSet = false; d->maskRect = QRect(); @@ -1810,7 +1810,7 @@ void QVGPaintEngine::clip(const QRegion ®ion, Qt::ClipOperation op) Q_D(QVGPaintEngine); // Use the QRect case if the region consists of a single rectangle. - if (region.numRects() == 1) { + if (region.rectCount() == 1) { clip(region.boundingRect(), op); return; } @@ -1853,7 +1853,7 @@ void QVGPaintEngine::clip(const QRegion ®ion, Qt::ClipOperation op) clip = r; else clip = clip.intersect(r); - if (clip.numRects() == 1) { + if (clip.rectCount() == 1) { d->maskValid = false; d->maskIsSet = false; d->maskRect = clip.boundingRect(); @@ -1871,7 +1871,7 @@ void QVGPaintEngine::clip(const QRegion ®ion, Qt::ClipOperation op) case Qt::IntersectClip: { - if (region.numRects() != 1) { + if (region.rectCount() != 1) { // If there is more than one rectangle, then intersecting // the rectangles one by one in modifyMask() will not give // the desired result. So fall back to path-based clipping. @@ -2148,7 +2148,7 @@ QRegion QVGPaintEngine::defaultClipRegion() bool QVGPaintEngine::isDefaultClipRegion(const QRegion& region) { - if (region.numRects() != 1) + if (region.rectCount() != 1) return false; QPaintDevice *pdev = paintDevice(); @@ -3544,7 +3544,7 @@ void QVGCompositionHelper::fillBackground d->clearColor = color; d->clearOpacity = 1.0f; } - if (region.numRects() == 1) { + if (region.rectCount() == 1) { QRect r = region.boundingRect(); vgClear(r.x(), screenSize.height() - r.y() - r.height(), r.width(), r.height()); @@ -3569,7 +3569,7 @@ void QVGCompositionHelper::fillBackground d->ensureBrush(brush); d->setFillRule(VG_EVEN_ODD); - if (region.numRects() == 1) { + if (region.rectCount() == 1) { fillBackgroundRect(region.boundingRect(), d); } else { const QVector<QRect> rects = region.rects(); diff --git a/src/openvg/qpixmapdata_vg_p.h b/src/openvg/qpixmapdata_vg_p.h index f552c7b..f6fac88 100644 --- a/src/openvg/qpixmapdata_vg_p.h +++ b/src/openvg/qpixmapdata_vg_p.h @@ -89,10 +89,10 @@ public: // Return the VGImage form of this pixmap, creating it if necessary. // This assumes that there is a VG context current. - VGImage toVGImage(); + virtual VGImage toVGImage(); // Return the VGImage form for a specific opacity setting. - VGImage toVGImage(qreal opacity); + virtual VGImage toVGImage(qreal opacity); QSize size() const { return QSize(w, h); } @@ -108,7 +108,7 @@ protected: void cleanup(); #endif -private: +protected: VGImage vgImage; VGImage vgImageOpacity; qreal cachedOpacity; |