[cairo] [PATCH] doc: fix some broken references

Uli Schlachter psychon at znc.in
Wed Dec 29 08:58:15 PST 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Am 28.12.2010 13:50, Maarten Bosmans wrote:
> This fixes some obvious mistakes in the docs.

I took a look at both patches and at least to me they look good. :)

> The only one I'm not quite sure about is changing
> CAIRO_STATUS_DEVICE_FINISHED to CAIRO_STATUS_SURFACE_FINISHED. It
> seems that that is what the code returns, but may be the documentation
> is correct and CAIRO_STATUS_DEVICE_FINISHED should be added to
> cairo_status_t.

IMHO this error should be added. The relevant code in cairo_device_acquire looks
like this where the XXX probably means "add the correct error code before
committing":

return _cairo_device_set_error (device, CAIRO_STATUS_SURFACE_FINISHED); /* XXX */

But for the time being, your patch obviously makes the docs match the actual
behavior.

> Stuff that is not in this patch (more knowledgable people should look into this)
>  - cairo_win32_scaled_font_create_for_logfontw()
>    in the docs for cairo_win32_scaled_font_select_font().
>    It does not exist, but I'm not quite sure if replacing it with
>    cairo_win32_font_create_for_logfontw() is correct.
>  - cairo_pdf_surface_create_for_callback() in language-bindings.xml.
>    It seems to me that the whole remark here is not appropriate
>    for the docs and can be removed.

Perhaps the first one means cairo_scaled_font_create? No idea. Anyway, git grep
doesn't find any other occurrences of either string in latest git master.

>  - cairo_xcb_device_create() and

The only public device creation APIs that I could find where
cairo_{glx,wgl,egl}_device_create. No other backend provides anything like this.
So the only way to get a cairo_device_t is cairo_surface_get_device or the gl
backend.

Seems like this paragraph needs some rewording.

>    cairo_xcb_device_debug_set_render_version() in cairo.h.
>   These functions do not exist currently.

Seems like this means cairo_xcb_device_debug_cap_xrender_version instead.

Perhaps it's not a good idea to use an unsupported backend for the examples in
the docs. Obviously, this means that XCB must become a supported backend for the
next release. ;)

According a quick grep, only drm, gl, script, xcb and xml backends provide APIs
that work on cairo_device_t.

Uli

- -- 
Q: Because it reverses the logical flow of conversation.
A: Why is putting a reply at the top of the message frowned upon?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iQEcBAEBCAAGBQJNG2imAAoJECLkKOvLj8sGdRYH/i/YjtUMq1P/6LeicUFj2utq
j1YB6+y4TxDnBeGA4qe4JtShtI+pO74wBBSKRfV9E94azjiu/6Qrvc/fJ3bh/OOo
t2JbXCsXH53A3QWxqdYSmJI7tNh5RRRanv5ZXifRVdoqwoJLTPLHT6iNXxooTBhD
LCtyAJIhfQABZiRKO5V9E5j2IEmxjnB1AcmElwGFT8WZsSP0rZXstwPswZ3FngIC
lDbFR8ve9pMTVVj9n6B0MRSW3a3UL2PL0baErGdLKAQLmettGAlPUpP349GUdoM7
baJ/hN2eMrTdtlcMqOaQ0WqB0ghKFASDRYpvoFODgCqE0OMa2XLdIxflLtXPmOk=
=mQFL
-----END PGP SIGNATURE-----


More information about the cairo mailing list