summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/direct2d/qwindowsdirect2dhelpers.h
diff options
context:
space:
mode:
authorLouai Al-Khanji <louai.al-khanji@digia.com>2014-01-24 14:59:39 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-31 14:51:48 +0100
commit8d38c0f6d6732762d6f0394880e96a6b2628b05a (patch)
tree968f52b78a0bad6fd387c69b6cd986b1ab10c57d /src/plugins/platforms/direct2d/qwindowsdirect2dhelpers.h
parent79fb39a87ce5ffbda22f297977b510e89ebf5485 (diff)
Move Direct2D paint engine on top of QPaintEngineEx
Make QWindowsDirect2DPaintEngine a subclass of QPaintEngineEx instead of QPaintEngine like the other paint engines inside Qt. This should both be faster and better supported, as the code paths handling QPaintEngineEx in QPainter are tested more. Additionally the visual output is closer to the raster engine, as all primitives are drawn using the same mechanism, resulting in fewer off-by-one-pixel errors. This change also makes designer work mostly correctly, apart from some remaining clipping bugs. Change-Id: I53d36c08e73883ff35e389d57f9d30b482fc6721 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Diffstat (limited to 'src/plugins/platforms/direct2d/qwindowsdirect2dhelpers.h')
-rw-r--r--src/plugins/platforms/direct2d/qwindowsdirect2dhelpers.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/platforms/direct2d/qwindowsdirect2dhelpers.h b/src/plugins/platforms/direct2d/qwindowsdirect2dhelpers.h
index 0ca26ca4cb..98248515e6 100644
--- a/src/plugins/platforms/direct2d/qwindowsdirect2dhelpers.h
+++ b/src/plugins/platforms/direct2d/qwindowsdirect2dhelpers.h
@@ -54,12 +54,12 @@ QT_BEGIN_NAMESPACE
Q_DECL_CONSTEXPR inline D2D1_RECT_U to_d2d_rect_u(const QRect &qrect)
{
- return D2D1::RectU(qrect.left(), qrect.top(), qrect.right(), qrect.bottom());
+ return D2D1::RectU(qrect.x(), qrect.y(), qrect.x() + qrect.width(), qrect.y() + qrect.height());
}
Q_DECL_CONSTEXPR inline D2D1_RECT_F to_d2d_rect_f(const QRectF &qrect)
{
- return D2D1::RectF(qrect.left(), qrect.top(), qrect.right(), qrect.bottom());
+ return D2D1::RectF(qrect.x(), qrect.y(), qrect.x() + qrect.width(), qrect.y() + qrect.height());
}
Q_DECL_CONSTEXPR inline D2D1_SIZE_U to_d2d_size_u(const QSizeF &qsize)