[cairo] API Shakeup: Eliminating cairo_show_surface

Bill Spitzak spitzak at d2.com
Tue May 3 11:57:42 PDT 2005



Carl Worth wrote:
> On Mon, 02 May 2005 18:27:06 -0700, Bill Spitzak wrote:
> 
>>Carl Worth wrote:
>>
>>
>>>   Currently, the first test passes, but the second test fails. The
>>>   problem here is some confusing semantics about the timing that
>>>   determines which user space to use for the user-to-pattern-space
>>>   matrix within the source pattern. (I had wanted the cairo_scale
>>>   call to scale the pattern, but not to scale the offset passed to
>>>   cairo_set_source_surface).
>>
>>Maybe cairo_paint() should take the x,y arguments instead?
> 
> 
> The offset is needed when using cairo_set_source_surface to set up a
> pattern for fills and strokes as well.

Okay, nevermind that suggestion.

It does sound like that xy should be the only thing that sets the 
pattern's transform, the current scale should have no effect on it. At 
least that's my understanding: if I do further cairo_scale calls and 
draw the pattern won't the pattern be drawn a larger size? If so then 
the pattern transform is multiplied by the current one at the moment the 
paint() call is done, thus the pattern transform must not contain any 
aspect of the current transform, otherwise it will be transformed twice.



More information about the cairo mailing list