aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/scenegraph/openvg/qsgopenvginternalrectanglenode.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/qsgopenvginternalrectanglenode.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/qsgopenvginternalrectanglenode.h')
-rw-r--r--src/plugins/scenegraph/openvg/qsgopenvginternalrectanglenode.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/scenegraph/openvg/qsgopenvginternalrectanglenode.h b/src/plugins/scenegraph/openvg/qsgopenvginternalrectanglenode.h
index 0d5283773f..e8d25c94f8 100644
--- a/src/plugins/scenegraph/openvg/qsgopenvginternalrectanglenode.h
+++ b/src/plugins/scenegraph/openvg/qsgopenvginternalrectanglenode.h
@@ -42,6 +42,7 @@
#include <private/qsgadaptationlayer_p.h>
#include "qsgopenvgrenderable.h"
+#include "qopenvgoffscreensurface.h"
#include <VG/openvg.h>
@@ -64,6 +65,7 @@ public:
void render() override;
void setOpacity(float opacity) override;
+ void setTransform(const QOpenVGMatrix &transform) override;
private:
void createVGResources();
@@ -89,6 +91,8 @@ private:
VGPath m_borderPath;
VGPaint m_rectanglePaint;
VGPaint m_borderPaint;
+
+ QOpenVGOffscreenSurface *m_offscreenSurface = nullptr;
};
QT_END_NAMESPACE