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

Alexander Shulgin alex.shulgin at gmail.com
Wed Jan 20 02:43:12 PST 2010


On Wed, Jan 20, 2010 at 12:28, Chris Wilson <chris at chris-wilson.co.uk> wrote:
> On Wed, 20 Jan 2010 12:18:24 +0200, Alexander Shulgin <alex.shulgin at gmail.com> wrote:
>> 4. Another thing I forgot to mention, is the use of set_mime_data() in
>> cairo-png.c.  I believe it's not justified and can lead to confusing
>> results.
>
> That issue is not limited to the debugging png loader, simply that the
> mime-data on a surface does not reflect drawing made to a surface.

Yes, obviously.  And I've added a paragraph to the set_mime_data()
docs warning the user of this:

 * Caution: the associated MIME data might be
 * totally unrelated to the actual content of the @surface, especially
 * if you draw on the @surface afterwards. Use this function with care.

But I don't buy people use png loader only for debugging purposes.
It's so sweet and simple and tempting to use as opposed to libpng, and
it's never been claimed "debugging only" API, at least in the docs
(what users read actually).

Some evidence: http://www.google.com/codesearch?q=cairo_image_surface_create_from_png

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.

--
Alex


More information about the cairo mailing list