[cairo] set_matrix affect stroke?

M Joonas Pihlaja jpihlaja at cc.helsinki.fi
Wed May 12 12:09:21 PDT 2010

On Wed, 12 May 2010, Stuart Axon wrote:

> I'm still getting a weird error where I get a really fat stroke.

The line width of a stroke is set in userspace units in effect at 
cairo_stroke() time.  One tip for getting consistent line widths is to 
reset the matrix to a constant state and set the line width just 
before the cairo_stroke() call.

> I'm not 100% whats happening as I'm using cairo as a backend for 
> shoebot, and running a bot in there.
> Is there any way to tell find out what cairos doing ?

By reading the fine manual. ;)  Also come join us on #cairo on 

> Also:  is doing this OK:
> Shoebot has to keep track of matrices, so I track these and just 
> pass them to cairo later, can anything go wrong with this approach 
> (seems to be working ok)  ?

Sure, why not?  You just have to keep track of what bits of cairo 
state are affected by the matrix and when.



More information about the cairo mailing list