summaryrefslogtreecommitdiffstats
path: root/src/gui/painting
diff options
context:
space:
mode:
authorTimur Pocheptsov <timur.pocheptsov@theqtcompany.com>2015-08-09 07:06:52 +0000
committerThe Qt Project <gerrit-noreply@qt-project.org>2015-08-09 07:06:52 +0000
commit5bfac9d653357c906946563b9494d7ae69cdad92 (patch)
tree0cc119af894a398497eba6f56fe2f224f6947616 /src/gui/painting
parentf08e1ecdc88e9373a31c1505d5db7f905431c644 (diff)
parent77da617dc8e378a631ee8c15b1b414f16b87f147 (diff)
Merge "Merge remote-tracking branch 'origin/5.5' into dev" into refs/staging/dev
Diffstat (limited to 'src/gui/painting')
-rw-r--r--src/gui/painting/qbackingstore.cpp14
-rw-r--r--src/gui/painting/qbrush.cpp2
-rw-r--r--src/gui/painting/qpaintengine_raster.cpp4
-rw-r--r--src/gui/painting/qpdf.cpp8
4 files changed, 23 insertions, 5 deletions
diff --git a/src/gui/painting/qbackingstore.cpp b/src/gui/painting/qbackingstore.cpp
index 4136c29d4e..68ed3eae6e 100644
--- a/src/gui/painting/qbackingstore.cpp
+++ b/src/gui/painting/qbackingstore.cpp
@@ -235,16 +235,27 @@ bool QBackingStore::scroll(const QRegion &area, int dx, int dy)
return d_ptr->platformBackingStore->scroll(QHighDpi::toNativeLocalRegion(area, d_ptr->window), QHighDpi::toNativePixels(dx, d_ptr->window), QHighDpi::toNativePixels(dy, d_ptr->window));
}
+/*!
+ Set \a region as the static contents of this window.
+*/
void QBackingStore::setStaticContents(const QRegion &region)
{
d_ptr->staticContents = region;
}
+/*!
+ Returns a pointer to the QRegion that has the static contents
+ of this window.
+*/
QRegion QBackingStore::staticContents() const
{
return d_ptr->staticContents;
}
+/*!
+ Returns a boolean indicating if this window
+ has static contents or not.
+*/
bool QBackingStore::hasStaticContents() const
{
return !d_ptr->staticContents.isEmpty();
@@ -297,6 +308,9 @@ void Q_GUI_EXPORT qt_scrollRectInImage(QImage &img, const QRect &rect, const QPo
}
}
+/*!
+ Returns a pointer to the QPlatformBackingStore implementation
+*/
QPlatformBackingStore *QBackingStore::handle() const
{
return d_ptr->platformBackingStore;
diff --git a/src/gui/painting/qbrush.cpp b/src/gui/painting/qbrush.cpp
index d6eb8d8a48..9e039b7ae4 100644
--- a/src/gui/painting/qbrush.cpp
+++ b/src/gui/painting/qbrush.cpp
@@ -35,7 +35,7 @@
#include "qpixmap.h"
#include "qbitmap.h"
#include "qpixmapcache.h"
-#include "qplatformpixmap.h"
+#include <qpa/qplatformpixmap.h>
#include "qdatastream.h"
#include "qvariant.h"
#include "qline.h"
diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp
index 28a6276746..6b8136c52d 100644
--- a/src/gui/painting/qpaintengine_raster.cpp
+++ b/src/gui/painting/qpaintengine_raster.cpp
@@ -3277,6 +3277,10 @@ bool QRasterPaintEngine::requiresPretransformedGlyphPositions(QFontEngine *fontE
return QPaintEngineEx::requiresPretransformedGlyphPositions(fontEngine, m);
}
+/*!
+ Indicates whether glyph caching is supported by the font engine
+ \a fontEngine with the given transform \a m applied.
+*/
bool QRasterPaintEngine::shouldDrawCachedGlyphs(QFontEngine *fontEngine, const QTransform &m) const
{
// The raster engine does not support projected cached glyph drawing
diff --git a/src/gui/painting/qpdf.cpp b/src/gui/painting/qpdf.cpp
index eb9cfcac2a..0814e0494d 100644
--- a/src/gui/painting/qpdf.cpp
+++ b/src/gui/painting/qpdf.cpp
@@ -2012,8 +2012,8 @@ int QPdfEnginePrivate::createShadingFunction(const QGradient *gradient, int from
if (reflect && step % 2) {
for (int i = stops.size() - 1; i > 0; --i) {
QGradientBound b;
- b.start = step + 1 - qBound(0., stops.at(i).first, 1.);
- b.stop = step + 1 - qBound(0., stops.at(i - 1).first, 1.);
+ b.start = step + 1 - qBound(qreal(0.), stops.at(i).first, qreal(1.));
+ b.stop = step + 1 - qBound(qreal(0.), stops.at(i - 1).first, qreal(1.));
b.function = functions.at(i - 1);
b.reverse = true;
gradientBounds << b;
@@ -2021,8 +2021,8 @@ int QPdfEnginePrivate::createShadingFunction(const QGradient *gradient, int from
} else {
for (int i = 0; i < stops.size() - 1; ++i) {
QGradientBound b;
- b.start = step + qBound(0., stops.at(i).first, 1.);
- b.stop = step + qBound(0., stops.at(i + 1).first, 1.);
+ b.start = step + qBound(qreal(0.), stops.at(i).first, qreal(1.));
+ b.stop = step + qBound(qreal(0.), stops.at(i + 1).first, qreal(1.));
b.function = functions.at(i);
b.reverse = false;
gradientBounds << b;