diff options
author | Jason Barron <jason.barron@nokia.com> | 2010-11-22 13:56:14 (GMT) |
---|---|---|
committer | Jason Barron <jason.barron@nokia.com> | 2010-11-23 07:57:12 (GMT) |
commit | 0df002ad600800a6c4ccadb969e1b1de7f8353e7 (patch) | |
tree | 1e7c7b96593aca8755e679ec6b785ab8da5ea361 /src/openvg/qpaintengine_vg.cpp | |
parent | 1ba013feae994a40abe3835185cae211b136a0e8 (diff) | |
download | Qt-0df002ad600800a6c4ccadb969e1b1de7f8353e7.zip Qt-0df002ad600800a6c4ccadb969e1b1de7f8353e7.tar.gz Qt-0df002ad600800a6c4ccadb969e1b1de7f8353e7.tar.bz2 |
Fix non-stroked filled paths in OpenVG paint engine.
The QPainter::fillRect() functions are optimizations to avoid state
changes in the paint engines. Since these functions should be
completely independant of state, ideally they should only call
functions that are also stateless.
QVGPaintEngine::fillRect() has two different code paths for this.
The vgClearRect() path of this function is stateless however in the
case of non-opaque or complex fills, this code path cannot be used and
instead we use the normal path fill function which is not entirely
stateless because ensureTransform() will apply the aliased coordinate
transform if the current state includes a stroked pen.
To avoid this happening for a pure fill (no stroke) we temporary set
the pen state to be Qt::NoPen such that the state used by
ensureTransform() is correct.
Task-number: QTBUG-14717
Reviewed-by: Jani Hautakangas
Diffstat (limited to 'src/openvg/qpaintengine_vg.cpp')
-rw-r--r-- | src/openvg/qpaintengine_vg.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/openvg/qpaintengine_vg.cpp b/src/openvg/qpaintengine_vg.cpp index aea203f..03d756d 100644 --- a/src/openvg/qpaintengine_vg.cpp +++ b/src/openvg/qpaintengine_vg.cpp @@ -1502,7 +1502,10 @@ void QVGPaintEnginePrivate::fill(VGPath path, const QBrush& brush, VGint rule) return; ensureBrush(brush); setFillRule(rule); + QPen savedPen = currentPen; + currentPen = Qt::NoPen; ensurePathTransform(); + currentPen = savedPen; vgDrawPath(path, VG_FILL_PATH); } |