Skip to content

Commit

Permalink
remove Arrayiterator from stroke
Browse files Browse the repository at this point in the history
  • Loading branch information
st4ll1 committed Oct 23, 2019
1 parent 3c44f90 commit 2283224
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/view/StrokeView.cpp
Expand Up @@ -19,24 +19,24 @@ StrokeView::~StrokeView()

void StrokeView::drawFillStroke()
{
auto points = s->iteratorBegin();
auto points = s->iteratorBegin();

if (points != s->iteratorEnd())
if (points != s->iteratorEnd())
{
Point p = *points;
points++;
Point p = *points;
points++;
cairo_move_to(cr, p.x, p.y);
}
else
{
return;
}

while (points != s->iteratorEnd())
while (points != s->iteratorEnd())
{
Point p = *points;
points++;
cairo_line_to(cr, p.x, p.y);
Point p = *points;
points++;
cairo_line_to(cr, p.x, p.y);
}

cairo_fill(cr);
Expand Down Expand Up @@ -111,7 +111,7 @@ void StrokeView::drawNoPressure()
{
int count = 1;
double width = s->getWidth();
std::vector<Point>::const_iterator points = s->iteratorBegin();
std::vector<Point>::const_iterator points = s->iteratorBegin();

bool group = false;
if (s->getFill() != -1 && s->getToolType() == STROKE_TOOL_HIGHLIGHTER)
Expand Down Expand Up @@ -145,7 +145,7 @@ void StrokeView::drawNoPressure()

count++;
lastPoint = p;
points++;
points++;
}

cairo_stroke(cr);
Expand Down

0 comments on commit 2283224

Please sign in to comment.