diff options
Diffstat (limited to 'src/plugins/scenegraph/softwarecontext/context.cpp')
-rw-r--r-- | src/plugins/scenegraph/softwarecontext/context.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/plugins/scenegraph/softwarecontext/context.cpp b/src/plugins/scenegraph/softwarecontext/context.cpp index b3b97a7d7c..6f5c997499 100644 --- a/src/plugins/scenegraph/softwarecontext/context.cpp +++ b/src/plugins/scenegraph/softwarecontext/context.cpp @@ -121,6 +121,8 @@ void Renderer::nodeChanged(QSGNode *node, QSGNode::DirtyState state) PixmapRenderer::PixmapRenderer(QSGRenderContext *context) : QSGRenderer(context) + , m_mirrorHorizontal(false) + , m_mirrorVertical(false) { } @@ -147,6 +149,12 @@ void PixmapRenderer::render(QPixmap *target) painter.setRenderHint(QPainter::Antialiasing); painter.setWindow(m_projectionRect); + if (m_mirrorHorizontal || m_mirrorVertical) { + QMatrix mirroringMatrix; + mirroringMatrix.scale(m_mirrorHorizontal ? -1 : 1, m_mirrorVertical ? -1 : 1); + painter.setMatrix(mirroringMatrix); + } + RenderingVisitor(&painter).visitChildren(rootNode()); } |