[cairo] set_matrix affect stroke?
stuaxo2 at yahoo.com
Thu May 13 11:31:20 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.
Cheers, this was exactly what I needed to do, for anyone googling
this, my draw function now looks like this:
# Go to initial point (CORNER or CENTER):
transform = self._call_transform_mode(self._transform)
# Run the path commands on the cairo context:
## Matrix affects stroke, so we need to reset it:
More information about the cairo