[cairo] [PATCH] Enable links to image files in SVG backend
Chris Wilson
chris at chris-wilson.co.uk
Wed Jan 13 04:07:20 PST 2010
On Thu, 24 Dec 2009 14:19:46 +0200, Alexander Shulgin <alex.shulgin at gmail.com> wrote:
> The idea behind the change is really simple: client code loads the
> image using some third-party library (in my case it's enough to know
> just the image dimensions, since pixels are not touched), then it sets
> origin filename using new API
> cairo_image_surface_set_origin_filename() and tweaks SVG surface to
> use this information when producing the output file using yet again
> new API cairo_svg_surface_set_links_image_files_enabled().
Hmm, I didn't particularly like the look of this suggested api, and was
hoping that either the eagle-eyed and API maestro, Carl, would have picked
up on this and complained.. I was also hoping that Adrian would have
pointed out how the existing mime-data could be extended for this use
case, and so we therefore have an existing paradigm in which to work...
This might be a bit of an abuse of mime-data, but I was thinking along the
lines of
cairo_surface_set_mime_data (surface, "x-data/filename",
"/path/to/executable.jpg", strlen("..."),
NULL, NULL);
Ideas?
-ickle
--
Chris Wilson, Intel Open Source Technology Centre
More information about the cairo
mailing list