[cairo] After 'set_line_width', subsequent stroking isslow

Bill Spitzak spitzak at d2.com
Thu Mar 1 01:37:19 PST 2007


Olivier Jolet wrote:

> I still have a difference using or not cairo_set_line_width. But I
> reduced the variation using amongst other things par values for the
> line_width. 

Is the speed ok if you set_line_width to a constant value of 2? That is 
the default value.

If so, is the speed ok if you set it to even numbers? If x is the value 
you were trying to set, use (int(x)+1)&-2. This should produce values 
that change as you scale your image but will avoid antialiasing.

If it really depends on the existence of the set_line_width call then 
this sounds like a bug in cairo, or your code is calling it a huge 
number of times, such as many more times than it draws a vertex.


More information about the cairo mailing list