diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2009-10-21 10:40:51 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2009-10-21 11:37:16 +0100 |
commit | 723055722f1d9a133fe9e78bb19165f2c7be720e (patch) | |
tree | 24817431023efb6a70ca1dbab5673e0bbf9d4658 | |
parent | cef8194178b01eaa2d10c1ba8291a9a4c5a6d302 (diff) |
[doc] Add comments on when surfaces are cleared on construction.
Or perhaps, more importantly, when the contents are left unmodified.
-rw-r--r-- | src/cairo.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/cairo.h b/src/cairo.h index c239deac..a43eae83 100644 --- a/src/cairo.h +++ b/src/cairo.h @@ -132,6 +132,15 @@ typedef struct _cairo cairo_t; * creates a bitmap image in memory. * The type of a surface can be queried with cairo_surface_get_type(). * + * The initial contents of a surface after creation depend upon the manner + * of its creation. If cairo creates the surface and backing storage for + * the user, it will be initially cleared; for example, + * cairo_image_surface_create() and cairo_surface_create_similar(). + * Alternatively, if the user passes in a reference to some backing storage + * and asks cairo to wrap that in a #cairo_surface_t, then the contents are + * not modified; for example, cairo_image_surface_create_for_data() and + * cairo_xlib_surface_create(). + * * Memory management of #cairo_surface_t is done with * cairo_surface_reference() and cairo_surface_destroy(). **/ |