summaryrefslogtreecommitdiffstats
path: root/src/openvg
diff options
context:
space:
mode:
authorMarius Storm-Olsen <marius.storm-olsen@nokia.com>2009-11-06 11:04:15 (GMT)
committerMarius Storm-Olsen <marius.storm-olsen@nokia.com>2009-11-09 11:10:52 (GMT)
commit4ad31892d735e6f1a7afffbf0bf8028663855adb (patch)
tree39d1cddf14853c00c4f2b1f55e62f3835d2925a4 /src/openvg
parent195f4b98fbf31a92e27be4533fc2ccae99372b82 (diff)
downloadQt-4ad31892d735e6f1a7afffbf0bf8028663855adb.zip
Qt-4ad31892d735e6f1a7afffbf0bf8028663855adb.tar.gz
Qt-4ad31892d735e6f1a7afffbf0bf8028663855adb.tar.bz2
API review: Rename numRects() -> rectCount()
QRegion::numRects() is marked obsolete. Removed all usage of the old function inside Qt and test-cases. Reviewed-by: Andreas Aardal Hanssen
Diffstat (limited to 'src/openvg')
-rw-r--r--src/openvg/qpaintengine_vg.cpp16
1 files changed, 8 insertions, 8 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 &region, 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 &region, 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 &region, 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();