[cairo] [PATCH] Enable links to image files in SVG backend

Alexander Shulgin alex.shulgin at gmail.com
Wed Jan 20 04:18:09 PST 2010


On Wed, Jan 20, 2010 at 13:50, Carl Worth <cworth at cworth.org> wrote:
> On Wed, 20 Jan 2010 10:59:20 +0000, Chris Wilson <chris at chris-wilson.co.uk> wrote:
>> On Wed, 20 Jan 2010 12:43:12 +0200, Alexander Shulgin <alex.shulgin at gmail.com> wrote:
>
>> > If user calls set_mime_data() explicitly, I'm OK with that, and he's
>> > on his own.  But when we call it for him and he has no idea, I think
>> > it's broken.
>
> Agreed.
>
>> It's a convenience API, primarily for loading pattern data, so I see
>> attaching the mime-data as part of that convenience.
>
> It's a convenience API, but it can be used for loading an image on which
> to draw annotations just as easily as loading pattern data.
>
> The current behavior of the call to cairo_surface_set_mime_data inside
> there is clearly a bug. Removing the call would fix the bug, but would
> eliminate this aspect of convenience (as you mention).
>
> The other option to fix the bug (without losing the convenience here)
> would be to clear the mime data when a surface is modified. This would
> make the data more consistent, certainly. It would mean that users would
> have to be careful about the timing of calling
> cairo_surface_set_mime_data. I can't (at the moment) think of a
> situation where an application wouldn't have the flexibility to just
> call that at the correct time.

This is what I proposed in my very first patch rejected for now
obvious reasons. :)

I'm too can't think why on earth anyone would attach image/filename
data to a surface, when draw something over it and finally paint with
the surface as a source and expect this to give the result which is
missing that drawing step.

--
Regards,
Alex


More information about the cairo mailing list