[cairo] cairo_status_t cleared?

Daniel Goldman dagoldman at yahoo.com
Tue Aug 17 17:50:25 PDT 2010


> > 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 
>
> > policy.
> > 
> 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
> name it.
> 
> >  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.
> 
> Benjamin
> 
Thanks for the clear explanation. Daniel



More information about the cairo mailing list