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

Emmanuel Pacaud emmanuel.pacaud at lapp.in2p3.fr
Fri Jan 15 05:40:23 PST 2010


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.

Emmanuel.



More information about the cairo mailing list