Minor fix, shape closing with Polygon Tool

The purpose of this fix is to match polygon preview with the polygon
result when using Polygon Tool (before this fix, we were been see few
pixels differences on the shape closing segment). To achieve this, the
way how we draw the entire joinStroke has to match how polygon
function interpolate the final stroke which closes the shape. So, the
input vertices of doPointshapeLine function were swapped.
This commit is contained in:
Gaspar Capello 2019-05-31 12:31:49 -03:00 committed by David Capello
parent 8c55d34e32
commit 43b4c77be5

View File

@ -139,9 +139,9 @@ public:
// contour tool, with brush type = kImageBrush with alpha content and // contour tool, with brush type = kImageBrush with alpha content and
// with not Pixel Perfect pencil mode. // with not Pixel Perfect pencil mode.
if (loop->getFilled() && !loop->getController()->isFreehand()) { if (loop->getFilled() && !loop->getController()->isFreehand()) {
doPointshapeLine(stroke[0].x, stroke[0].y, doPointshapeLine(stroke[stroke.size()-1].x,
stroke[stroke.size()-1].x, stroke[stroke.size()-1].y,
stroke[stroke.size()-1].y, loop); stroke[0].x, stroke[0].y, loop);
} }
} }