cairo/doc
Alexander Shulgin 15d9c5fcd8 Added new MIME type CAIRO_MIME_TYPE_URI and it's support in SVG backend
The rationale behind this change is that when someone is trying to
draw on a SVG surface using image surface patterns, the resulting SVG
file can take up to ridiculous 20 megabytes for 3-4 typical
photographic images in a single SVG file.  This also can take
significant amount of CPU time to complete.

The reason for this behaviour is that currently whenever SVG backend
needs to emit an image tag for a surface pattern it takes a snapshot
of the subject surface, encodes it in PNG, then Base64-encodes and
emits the (huge) resulting string.  With use of
cairo_surface_set_mime_data API this can be somewhat improved by
associating JPEG image contents with the corresponding surfaces.
Still this doesn't allow for post-processing of involved photographic
images without regenerating the SVG file.

As SVG specification allows URIs in the image tag's xlink:href
attribute, it is possible instead of embedding encoded image data to
simply link image files residing physically on the same medium as the
generated SVG file: files on disk under common directory, files on a
web server at common base URI, etc.

To make this happen we add new (unofficial) MIME type "text/x-uri" and
let users associate URIs with surfaces through
cairo_surface_set_mime_data() API.  When SVG backend needs to emit
surface contents and it sees "text/x-uri" attached to the surface, it
emits this data instead of taking snapshot.  The URI data is emitted
as is, so correctness check is left solely to the client code.
2010-03-02 10:07:19 +00:00
..
public Added new MIME type CAIRO_MIME_TYPE_URI and it's support in SVG backend 2010-03-02 10:07:19 +00:00
tutorial [twin] Switch internal users to the new name. 2008-12-18 12:06:46 +00:00
.gitignore Rename .cvsignore to .gitignore. Add *~ and *.o. 2006-02-15 15:00:26 -08:00
Makefile.am Makefile.am cleanup 2008-09-11 15:49:09 -04:00