[cairo] Expected behavior of dashes, lines and patterns under transform

Bill Spitzak spitzak at gmail.com
Mon Apr 30 11:00:40 PDT 2012


On 04/29/2012 02:51 PM, Chris Wilson wrote:

>> 1. Line widths seem to be scaled up (which is counter-intuitive)
>
> Long-standing bug that was not fixed in time for cairo-1.0, hence now
> locked in stone. The matrix for line-widths is the CTM at the time of
> the stroke not the CTM at the time of setting the line-width.

I believe actually this was done on purpose. It was to duplicate the 
behavior of PostScript. Only later on was it decided that this is not 
useful or desired behavior.

It can certainly be fixed, at worse with some kind of "mode" in the 
cairo_t, or a different function to set the line width (that is needed 
anyway as a line width will have to be a 2x2 matrix). I suspect also it 
could just be changed without breaking any real clients, as they all set 
the line width after setting the matrix to work around this.


More information about the cairo mailing list