Re: misc. cairo_t questions

Roger Davis <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <[email protected]>
Hi Uri,

Thanks for your help! One followup question:

>> (3) It seems like almost all of the cairo_set...(), etc., functions 
>>return void. Is there a standard behavior in place to handle bad 
>>arguments to these calls, or other error conditions?
>
>Yes. If some object gets in an error condition, this error condition is 
>sticky. You can not un-error something afterwards. To get this error 
>flag, there are cairo_status(), cairo_surface_status(), 
>cairo_pattern_status(), ....

I like to be reasonably rigorous in error checking (and am extremely 
averse to allowing situations that could result in a core dump), but it 
does seem like overkill to do a cairo_status() after every single change 
to a context or after every drawing operation. Are there certain 
operations to contexts or surfaces in particular which are unusually prone 
to error generation, especially errors which might ultimately lead to a 
core dump, which it would be useful to check via cairo_???_status()? By 
the way, checking status after cairo_select_font_face(cr, 
"NonexistentFont" ...) doesn't yield any abnormal error code, so I'm 
wondering when these functions might actually return useful information. 
Perhaps this particular case is non-representative since it is, as you 
say, from the toy API.

Thanks!

Roger
--
cairo mailing list
[email protected]
http://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.