From d9f9d1700b145295b4f45e02e324d67a96302643 Mon Sep 17 00:00:00 2001 From: Andreas Butti Date: Sat, 22 Dec 2018 22:30:39 +0100 Subject: [PATCH] Draw highlighter always without pressure fixes #583 --- src/view/DocumentView.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/view/DocumentView.cpp b/src/view/DocumentView.cpp index 819d7ab0..6c810629 100644 --- a/src/view/DocumentView.cpp +++ b/src/view/DocumentView.cpp @@ -129,7 +129,7 @@ void DocumentView::drawStroke(cairo_t* cr, Stroke* s, int startPoint, double sca double width = s->getWidth(); // No pressure sensitivity, easy draw a line... - if (!s->hasPressure()) + if (!s->hasPressure() || s->getToolType() == STROKE_TOOL_HIGHLIGHTER) { // Set width cairo_set_line_width(cr, width * scaleFactor); @@ -138,7 +138,7 @@ void DocumentView::drawStroke(cairo_t* cr, Stroke* s, int startPoint, double sca { Point p = points.next(); - if (startPoint <= count++) + if (startPoint <= count) { cairo_line_to(cr, p.x, p.y); } @@ -146,6 +146,8 @@ void DocumentView::drawStroke(cairo_t* cr, Stroke* s, int startPoint, double sca { cairo_move_to(cr, p.x, p.y); } + + count++; } cairo_stroke(cr);