summaryrefslogtreecommitdiffstats
path: root/src/declarative/graphicsitems/qmlgraphicspainteditem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative/graphicsitems/qmlgraphicspainteditem.cpp')
-rw-r--r--src/declarative/graphicsitems/qmlgraphicspainteditem.cpp24
1 files changed, 14 insertions, 10 deletions
diff --git a/src/declarative/graphicsitems/qmlgraphicspainteditem.cpp b/src/declarative/graphicsitems/qmlgraphicspainteditem.cpp
index b1b1210..2f467e7 100644
--- a/src/declarative/graphicsitems/qmlgraphicspainteditem.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicspainteditem.cpp
@@ -223,10 +223,14 @@ void QmlGraphicsPaintedItem::paint(QPainter *p, const QStyleOptionGraphicsItem *
}
QRegion topaint = p->clipRegion();
- if (topaint.isEmpty())
- topaint = effectiveClip;
- else
+ if (topaint.isEmpty()) {
+ if (effectiveClip.isEmpty())
+ topaint = QRect(0,0,p->device()->width(),p->device()->height());
+ else
+ topaint = effectiveClip;
+ } else {
topaint &= effectiveClip;
+ }
topaint &= content;
QRegion uncached(content);
@@ -323,27 +327,26 @@ void QmlGraphicsPaintedItem::paint(QPainter *p, const QStyleOptionGraphicsItem *
}
/*!
- \qmlproperty int PaintedItem::cacheSize
+ \qmlproperty int PaintedItem::pixelCacheSize
This property holds the maximum number of pixels of image cache to
allow. The default is 0.1 megapixels. The cache will not be larger
- than the (unscaled) size of the item.
+ than the (unscaled) size of the WebView.
*/
-
/*!
- \property QmlGraphicsPaintedItem::cacheSize
+ \property QmlGraphicsPaintedItem::pixelCacheSize
The maximum number of pixels of image cache to allow. The default
is 0.1 megapixels. The cache will not be larger than the (unscaled)
size of the QmlGraphicsPaintedItem.
*/
-int QmlGraphicsPaintedItem::cacheSize() const
+int QmlGraphicsPaintedItem::pixelCacheSize() const
{
Q_D(const QmlGraphicsPaintedItem);
return d->max_imagecache_size;
}
-void QmlGraphicsPaintedItem::setCacheSize(int pixels)
+void QmlGraphicsPaintedItem::setPixelCacheSize(int pixels)
{
Q_D(QmlGraphicsPaintedItem);
if (pixels < d->max_imagecache_size) {
@@ -369,6 +372,8 @@ void QmlGraphicsPaintedItem::setCacheSize(int pixels)
d->max_imagecache_size = pixels;
}
+
+
/*!
\property QmlGraphicsPaintedItem::fillColor
@@ -419,5 +424,4 @@ void QmlGraphicsPaintedItem::setSmoothCache(bool on)
}
-
QT_END_NAMESPACE