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

Bill Spitzak spitzak at gmail.com
Wed Jan 20 12:21:25 PST 2010


I would think that if a surface has the necessary code to automatically 
add the mime data when it is created, it can also remove the mime data 
when it is drawn on. Therefore all the png surface has to do is delete 
the mime data on any drawing and we get both the convinent "it remembers 
the filename for you" and the "it never produces the wrong image" 
effects wanted.

Though the png api is for "debugging" I do think it needs to be designed 
fairly carefully, as it will be copied by anybody trying to provide a 
more complete image library.

Chris Wilson 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. It was
> decided that attaching mime-data to a surface rather than a pattern would
> be more convenient for the expected users, even though it leads to this
> semantic mismatch. (A pattern is also not nearly as immutable as it might
> be...)
> -ickle
> 


More information about the cairo mailing list