[cairo] cairo_status_t cleared?
otte at redhat.com
Tue Aug 17 13:52:18 PDT 2010
On Tue, 2010-08-17 at 13:27 -0700, Daniel Goldman wrote:
> Does cairo_status_t from cairo_t ever get cleared (overwritten with
> CAIRO_STATUS_SUCCESS)? The cairo_status_t documentation says that it retains the
> last error, but is silent on whether ever cleared by a successful running
> function. I know I could experiment, but it seems better to find out the overall
It will always keep the error, if one was set. Every function you call
on a cairo_t in an error state is a no-op. So there is no way to ever
clear an error.
The same is true for all other objects: surfaces, patterns, regions, you
> Also, is there a function (or other recommended way) to reset cairo_t to
> CAIRO_STATUS_SUCCESS? I looked, but could not find one.
There is none. An error status can not ever be cleared. There has been talk about
adding functions that would allow it, but currently it's not possible. On error
you have to start over with a new cairo_t.
More information about the cairo