[cairo] How is cairo_show_surface supposed to work?
Per Bjornsson
perbj at stanford.edu
Thu Feb 10 17:07:10 PST 2005
Hi Carl,
Thanks a lot for looking at my snippet and my problem. I'm happy to hear
that this is a bug since I was utterly confused for a while. (By the
way, if you think that my little snippet is useful as a test case, feel
free to do as you wish with it, I'm happy to put it in the public
domain, although it's short and useless enough anyways that I doubt
copyright would be an issue no matter what I said...)
> > I would have guessed that it composites the surface pointed to by
> > "surface" onto the surface associated with "cr", with the upper right
> > corner (modulo rotations) at the current point and the size (in user-
> > space units) of the composited surface given by "width" and "height"
>
> That's a fine guess, (though I think you meant upper-left corner, of
> course).
Duh, of course. /me blushes. I'll blame it on being in a hurry when I
wrote that! :)
> You can work around the current bug by resetting to the default matrix
> just prior to calling cairo_show_surface, as in the attached snippet,
> (but yes this is pretty ugly).
Ah, of course, that's a useful workaround - thanks! However, how about
when you want to scale the overlay surface with a non-unity factor, or
even rotate it? Is cairo_show_surface supposed to let you do that? Or
should this also be done using a pattern?
Best regards,
Per Bjornsson
More information about the cairo
mailing list