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

Alexander Shulgin alex.shulgin at gmail.com
Fri Jan 15 03:23:11 PST 2010

On Wed, Jan 13, 2010 at 21:15, Arjen Nienhuis <a.g.nienhuis at gmail.com> wrote:
>>  cairo_surface_set_mime_data (surface, "x-data/filename",
>>                               "/path/to/executable.jpg", strlen("..."),
>>                               NULL, NULL);
>> Ideas?
>> -ickle
> I like it. But it could be a url, not just a file path.

Attached is a patch which introduces a new mime type "text/x-uri"[1]
and uses this data in the SVG backend to replace image data with just
a link[2] to the file.

Attention paid to special characters which may occur in the mime data,
like ampersand and double quote.

Is this looking good enough now? :)


[1] To my knowledge this is the most appropriate type for the task.
[2] Filename, URI, whatever.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: svg-emit-surface-mime-type-xuri.patch
Type: text/x-patch
Size: 2964 bytes
Desc: not available
Url : http://lists.cairographics.org/archives/cairo/attachments/20100115/c17975ae/attachment.bin 

More information about the cairo mailing list