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

Alexander Shulgin alex.shulgin at gmail.com
Wed Jan 13 12:42:23 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.

Yes, sounds pretty reasonable.

I'd prepare revised patch if you guys agree this is a way to go.

In spirit of current behaviour of set_mime_data API this data attached
to the surface won't "expire" even if drawing is done on the surface
(as opposed to my initial proposition).  So this check is left solely
for the client code, right?

Also, I think we should prefer "x-data/filename" (or name it
"x-data/uri" ?) over other mime types to embed if a number of them is
associated with a given surface.

--
Regards,
Alex


More information about the cairo mailing list