Hello colleague,

On Friday, February 28, 2014 6:59:13 AM UTC+1, Roger Herikstad wrote:
>
> Hi all,
>  I tried to get a better understanding of Cairo drawing by implementing 
> this solution myself. This is just a proof-of-concept and I didn't do any 
> rigorous testing, but subjectively comparing the resize performance of a 
> Winston scatter plot of ~10000 points and this new solution, I noticed a 
> significant speed-up. Note that I still find it too slow, but that's 
> probably due to my lack of understanding of Cairo. 
> Basically, this is what I did:
> I appreciate any comments on this. Thanks!
>

1)
How do you plan to treat different colors per dot?
2) 
In a lot of cairo advices, the fastest way for a round dot is:
    set_line_cap(cr,Cairo.CAIRO_LINE_CAP_ROUND)
    set_line_width(cr,radius)
    
    for i=1:n
       move_to(cr,px[i],py[i]);
       rel_line_to(cr,0,0);
       stroke(cr);
       end


so setting the line end to a ROUND CAP and plot a line of length 0.

 

Reply via email to