[Libreoffice-commits] core.git: Branch 'feature/opengl-canvas-rework' - 2 commits - canvas/source

Michael Jaumann meta_dev at yahoo.com
Wed Jan 21 01:20:28 PST 2015


 canvas/source/opengl/ogl_canvashelper.cxx |   24 ++++++++++++++++--------
 1 file changed, 16 insertions(+), 8 deletions(-)

New commits:
commit 12d33874d6dcecdc43b82f438da0798828c7e971
Author: Michael Jaumann <meta_dev at yahoo.com>
Date:   Wed Jan 21 09:15:59 2015 +0000

    draw strokes correct
    
    dont connect single polygons from createAreaGeometry
    draw each polygone for itself
    
    Change-Id: Iff10fc7a221453d48ca042dd556f86b4342b60ef

diff --git a/canvas/source/opengl/ogl_canvashelper.cxx b/canvas/source/opengl/ogl_canvashelper.cxx
index 6397f4f0..7cdc7e6 100644
--- a/canvas/source/opengl/ogl_canvashelper.cxx
+++ b/canvas/source/opengl/ogl_canvashelper.cxx
@@ -659,10 +659,22 @@ namespace oglcanvas
                         unoCapeFromCap(strokeAttributes.StartCapType)
                         ));
                 }
-                rAct.maPolyPolys.push_back(aStrokedPolyPoly);
-                rAct.maPolyPolys.back().makeUnique(); // own copy, for thread safety
+                // Note: the generated stroke poly-polygon is NOT free of
+                // self-intersections. Therefore, if we would render it
+                // via OutDev::DrawPolyPolygon(), on/off fill would
+                // generate off areas on those self-intersections.
 
-                rAct.maFunction = &lcl_fillPolyPolygon;
+                for(sal_uInt32 i=0;i<nSize; ++i)
+                {
+                    ::basegfx::B2DPolyPolygon tempStrokedPoly;
+                    tempStrokedPoly.append(aStrokedPolyPoly.getB2DPolygon(i));
+
+                    rAct.maPolyPolys.push_back(tempStrokedPoly);
+                    rAct.maPolyPolys.back().makeUnique(); // own copy, for thread safety
+
+                    rAct.maFunction = &lcl_fillPolyPolygon;
+
+                }
             }
         }
 
commit f7e8dc334ad82c182c84133420c40e77f4e68c2d
Author: Michael Jaumann <meta_dev at yahoo.com>
Date:   Wed Jan 21 09:09:51 2015 +0000

    no need here for color
    
    Change-Id: I7bde6d916e801eda6bb4c5db4a050b86b6758178

diff --git a/canvas/source/opengl/ogl_canvashelper.cxx b/canvas/source/opengl/ogl_canvashelper.cxx
index c3b9800..6397f4f0 100644
--- a/canvas/source/opengl/ogl_canvashelper.cxx
+++ b/canvas/source/opengl/ogl_canvashelper.cxx
@@ -249,10 +249,6 @@ namespace oglcanvas
         {
             RenderHelper* pRenderHelper = rHelper.getDeviceHelper()->getRenderHelper();
             pRenderHelper->SetModelAndMVP(setupState(rTransform, eSrcBlend, eDstBlend));
-            glm::vec4 color  = glm::vec4( (float) rendering::ARGBColor().Red,
-                                (float) rendering::ARGBColor().Green,
-                                (float) rendering::ARGBColor().Blue,
-                                (float) rendering::ARGBColor().Alpha);
 
             // convert to weird canvas textur coordinate system (not
             // [0,1]^2, but path coordinate system)
@@ -334,7 +330,7 @@ namespace oglcanvas
                                 const ::basegfx::B2DHomMatrix&   rTransform,
                                 GLenum                           eSrcBlend,
                                 GLenum                           eDstBlend,
-                                const rendering::ARGBColor&      rColor,
+                                const rendering::ARGBColor&      /*rColor*/,
                                 const CanvasBitmap&              rBitmap )
         {
             RenderHelper* pRenderHelper = rHelper.getDeviceHelper()->getRenderHelper();


More information about the Libreoffice-commits mailing list