aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/scenegraph/openvg/qsgopenvgrenderable.h
diff options
context:
space:
mode:
authorAndy Nichols <andy.nichols@qt.io>2016-11-29 15:29:39 +0100
committerAndy Nichols <andy.nichols@qt.io>2016-12-13 15:43:24 +0000
commit0119439c9d25dfd892bbee47068e9d726f4bff97 (patch)
tree71df5718b21cd1471eb6cb4c4eac4c19a691f869 /src/plugins/scenegraph/openvg/qsgopenvgrenderable.h
parent3f57f2b7cc3899af154257a3c858bd23d9f03a62 (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/qsgopenvgrenderable.h')
-rw-r--r--src/plugins/scenegraph/openvg/qsgopenvgrenderable.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/plugins/scenegraph/openvg/qsgopenvgrenderable.h b/src/plugins/scenegraph/openvg/qsgopenvgrenderable.h
index 7a09f2afbe..a544ae743e 100644
--- a/src/plugins/scenegraph/openvg/qsgopenvgrenderable.h
+++ b/src/plugins/scenegraph/openvg/qsgopenvgrenderable.h
@@ -44,6 +44,8 @@
#include <VG/openvg.h>
+#include "qopenvgmatrix.h"
+
QT_BEGIN_NAMESPACE
class QSGOpenVGRenderable
@@ -58,9 +60,13 @@ public:
float opacity() const;
VGPaint opacityPaint() const;
+ virtual void setTransform(const QOpenVGMatrix &transform);
+ const QOpenVGMatrix &transform() const;
+
private:
float m_opacity;
VGPaint m_opacityPaint;
+ QOpenVGMatrix m_transform;
};