diff options
author | Andy Nichols <andy.nichols@qt.io> | 2016-11-29 15:29:39 +0100 |
---|---|---|
committer | Andy Nichols <andy.nichols@qt.io> | 2016-12-13 15:43:24 +0000 |
commit | 0119439c9d25dfd892bbee47068e9d726f4bff97 (patch) | |
tree | 71df5718b21cd1471eb6cb4c4eac4c19a691f869 /src/plugins/scenegraph/openvg/qsgopenvgnodevisitor.h | |
parent | 3f57f2b7cc3899af154257a3c858bd23d9f03a62 (diff) |
OpenVG: Support rendering paths with non-affine transforms
The current approach to rendering paths (used by Rectangles and Glyph
nodes) does not support rendering with non-affine transformations. That
is because OpenVG does not support passing a non-affine transformation
matrix when rendering paths. So instead when using a non-affine
transform we will fallback to rendering to an offscreen VGImage, then
rendering that as an image which can have a perspective transform.
Change-Id: I01508bcb67b339323cb6400c7ff6d885b62c5e02
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src/plugins/scenegraph/openvg/qsgopenvgnodevisitor.h')
-rw-r--r-- | src/plugins/scenegraph/openvg/qsgopenvgnodevisitor.h | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/src/plugins/scenegraph/openvg/qsgopenvgnodevisitor.h b/src/plugins/scenegraph/openvg/qsgopenvgnodevisitor.h index 3105f2076d..4805d63024 100644 --- a/src/plugins/scenegraph/openvg/qsgopenvgnodevisitor.h +++ b/src/plugins/scenegraph/openvg/qsgopenvgnodevisitor.h @@ -79,24 +79,12 @@ public: void endVisit(QSGRenderNode *) override; private: - struct ClipState { - ClipState(VGPath p, QOpenVGMatrix t) - { - path = p; - transform = t; - } - - VGPath path; - QOpenVGMatrix transform; - }; - VGPath generateClipPath(const QRectF &rect) const; void renderRenderableNode(QSGOpenVGRenderable *node); - QStack<QOpenVGMatrix> m_transformStack; QStack<float> m_opacityState; - QStack<ClipState*> m_clipStack; + QStack<VGPath> m_clipStack; }; QT_END_NAMESPACE |