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

Alexander Shulgin alex.shulgin at gmail.com
Fri Jan 15 06:49:12 PST 2010


On Fri, Jan 15, 2010 at 15:40, Emmanuel Pacaud
<emmanuel.pacaud at lapp.in2p3.fr> wrote:
> Le vendredi 15 janvier 2010 à 12:23 +0100, Alexander Shulgin a écrit :
>> 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.
>
> I also like the idea of using mime data as link to files. but your
> implementation seems to only handle ascii uris. UTF8 would be better.

Actually it works correctly with UTF-8 and I've tested it.

What makes you think it wont work?

--
Regards,
Alex


More information about the cairo mailing list