From 262b8abc905d560b11ac170604829914d51f0cd9 Mon Sep 17 00:00:00 2001 From: David Capello Date: Wed, 8 May 2019 12:50:30 -0300 Subject: [PATCH] Temporal fix for filling polygons (at least with regular brushes) --- src/app/tools/intertwiners.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/app/tools/intertwiners.h b/src/app/tools/intertwiners.h index fd619f9cf..10d24b259 100644 --- a/src/app/tools/intertwiners.h +++ b/src/app/tools/intertwiners.h @@ -151,7 +151,11 @@ public: // polygon and the contour when we use a custom brush and we use // the alpha compositing ink with opacity < 255 or the custom // brush has semi-transparent pixels. - //joinStroke(loop, stroke); + if (loop->getBrush()->type() != BrushType::kImageBrushType) { + // TODO if we fix the doc::algorithm::polygon to draw the exact + // scanlines, we can finally remove this joinStroke() + joinStroke(loop, stroke); + } // Fill content doc::algorithm::polygon(stroke.size(), (const int*)&stroke[0], loop, (AlgoHLine)doPointshapeHline); @@ -485,7 +489,11 @@ public: // polygon and the contour when we use a custom brush and we use // the alpha compositing ink with opacity < 255 or the custom // brush has semi-transparent pixels. - //joinStroke(loop, stroke); + if (loop->getBrush()->type() != BrushType::kImageBrushType) { + // TODO if we fix the doc::algorithm::polygon to draw the exact + // scanlines, we can finally remove this joinStroke() + joinStroke(loop, stroke); + } // Fill content doc::algorithm::polygon(stroke.size(), (const int*)&stroke[0], loop, (AlgoHLine)doPointshapeHline);