[cairo] Problems printing dotted/dashed lines - cairo_set_dash working?

Ian ian at underpressuredivers.com
Thu Feb 17 23:55:34 PST 2011


> -----Original Message-----
> From: Andrea Canciani [mailto:ranma42 at gmail.com]
> 
 >
> > I want to print a line of the grid dotted or dashed.
> > And I added these two lines before the "cairo_move_to":
> >
> >  static const double dotted[] = {1.0};
> >  cairo_set_dash(cr, dotted, 1, 0);
> >
> > This had no effect and the line is still printed solid
> 
> Can you please check if setting a small dash offset causes the line to
appear
> dashed? It might be useful to locate the problem with more accuracy.
> 
> Andrea

Nope - dotted with {1.0} and dashed with {4.0, 1.0} and {1.0, 1.0} all draw
solid in Windows. With the same app running in Linux they draw dotted/dashed
as they should.

I just attached a small test printing app with this (otherwise unrelated)
GTK bug, and I included some lines in it to demo this problem too:
https://bugzilla.gnome.org/show_bug.cgi?id=642655

Ian






More information about the cairo mailing list