Skip to content

Commit

Permalink
avoid building very long paths in renderer. fixes #89
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffBezanson committed Oct 24, 2013
1 parent 620148c commit fdedc4a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/renderer.jl
Original file line number Diff line number Diff line change
Expand Up @@ -245,9 +245,14 @@ function curve(self::CairoRenderer, x::AbstractVector, y::AbstractVector)
move_to(self.ctx, x[i], y[i])
for i = i+1:n
line_to(self, x[i], y[i])
if i == n || (i&127)==0
stroke(self.ctx)
if i < n
move_to(self, x[i], y[i])
end
end
end
end
stroke(self.ctx)
end

image(r::CairoRenderer, src, x, y, w, h) = image(r.ctx, src, x, y, w, h)
Expand Down

0 comments on commit fdedc4a

Please sign in to comment.