[Libreoffice-commits] core.git: Branch 'feature/opengl-canvas-rework' - canvas/source
Michael Jaumann
meta_dev at yahoo.com
Wed Dec 10 00:42:37 PST 2014
canvas/source/opengl/ogl_canvashelper.cxx | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
New commits:
commit c6a91186d8807aee578693d9ec764a9b9d1a8ba6
Author: Michael Jaumann <meta_dev at yahoo.com>
Date: Wed Dec 10 08:40:39 2014 +0000
fix, transformation matrix for gradients
Change-Id: Ib93937ab944c7197824b7c618eada4ad70e64cb0
diff --git a/canvas/source/opengl/ogl_canvashelper.cxx b/canvas/source/opengl/ogl_canvashelper.cxx
index de8ef93..ec08cf8 100644
--- a/canvas/source/opengl/ogl_canvashelper.cxx
+++ b/canvas/source/opengl/ogl_canvashelper.cxx
@@ -213,11 +213,12 @@ namespace oglcanvas
aBounds.expand(::basegfx::tools::getRange(*aCurr++));
aTextureTransform.translate(-aBounds.getMinX(), -aBounds.getMinY());
aTextureTransform.scale(1/aBounds.getWidth(), 1/aBounds.getHeight());
+ aTextureTransform.invert();
const float aTextureTransformation[] =
{
- float(aTextureTransform.get(1,0)), float(aTextureTransform.get(1,1)),
- float(aTextureTransform.get(1,2)), float(aTextureTransform.get(0,0)),
- float(aTextureTransform.get(0,1)), float(aTextureTransform.get(0,2))
+ float(aTextureTransform.get(0,0)), float(aTextureTransform.get(1,0)),
+ float(aTextureTransform.get(0,1)), float(aTextureTransform.get(1,1)),
+ float(aTextureTransform.get(0,2)), float(aTextureTransform.get(1,2))
};
const glm::mat3x2 aTexTransform = glm::make_mat3x2(aTextureTransformation);
More information about the Libreoffice-commits
mailing list