Skip to content

Commit

Permalink
Fix contour tool (draw first pixel for contour tool)
Browse files Browse the repository at this point in the history
  • Loading branch information
dacap committed May 11, 2019
1 parent 388af3f commit 8e53b5f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/app/tools/intertwiners.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,12 @@ class IntertwineAsLines : public Intertwine {
// Don't draw the first point in freehand tools (this is to
// avoid painting above the last pixel of a freehand stroke,
// when we use Shift+click in the Pencil tool to continue the
// old stroke).
// old stroke). When filled is true we are talking about the
// contour tool, so we do all the points.
// TODO useful only in the case when brush size = 1px
const int start = (loop->getController()->isFreehand() ? 1: 0);
const int start =
(loop->getController()->isFreehand() &&
!loop->getFilled() ? 1: 0);

for (int c=start; c<m_pts.size(); ++c)
doPointshapePoint(m_pts[c].x, m_pts[c].y, loop);
Expand Down

0 comments on commit 8e53b5f

Please sign in to comment.