cairo/doc/public
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
..
tmpl Added new MIME type CAIRO_MIME_TYPE_URI and it's support in SVG backend 2010-03-02 10:07:19 +00:00
.gitignore Update .gitignore files 2008-06-26 16:20:58 -04:00
cairo-docs.xml build: Remove glitz surface 2010-01-27 09:56:14 +01:00
cairo-overrides.txt configure.in Makefile.am docs/Makefile.am docs/public/*: Add framework for doing docs via gtk-doc. 2005-01-27 11:35:25 +00:00
cairo-sections.txt Added new MIME type CAIRO_MIME_TYPE_URI and it's support in SVG backend 2010-03-02 10:07:19 +00:00
cairo.types configure.in Makefile.am docs/Makefile.am docs/public/*: Add framework for doing docs via gtk-doc. 2005-01-27 11:35:25 +00:00
check-doc-coverage.sh Set LC_ALL=C instead of LANG=C 2009-09-16 15:50:34 -04:00
check-doc-syntax.sh Set LC_ALL=C instead of LANG=C 2009-09-16 15:50:34 -04:00
language-bindings.xml [doc] Add links to solid pattern constructors. 2008-09-30 11:47:53 +01:00
Makefile.am [doc] Workaround read-only tree during make distcheck 2009-06-12 11:15:16 +01:00
README Revamp the build system. 2008-09-02 20:24:08 -04:00

Cairo Reference Documentation
=============================

The API documentation is generated using gtk-doc.


Building
--------

The documentation is not built by default.  To build it you need to
configure with gtk-doc enabled (--enable-gtk-doc), and run:

	make doc


Adding New API
--------------

When adding new symbols and macros to the public API, modify
cairo-section.txt and add new symbols to the right place.

When adding whole new features, you also need to modify cairo-docs.xml
and add a new file under tmpl/.  Beware that the files are tmpl/ are
both manually edited AND modified by gtk-doc, gathering documentation
stub from source files.


Tests
-----

There are some tests in this directory, ensuring proper documentation
syntax as well as checking that all public symbols are fully documented.

After adding any new API, just run:

	make check