[cairo] Detect Cairo Error in Cairomm
Chris Wilson
chris at chris-wilson.co.uk
Thu May 6 10:04:46 PDT 2010
On Thu, 06 May 2010 12:46:53 +0000, TalGuy385 at gmail.com wrote:
> How can I detect that a cairo out of memory error with the cairomm library.
> I am trying to make a realtime instrument cluster for my car and need to be
> able to switch to a default less graphical screen if I run out of memory.
cairo will go into an error state, that is the CAIRO_STATUS_NO_MEMORY will
be set on the context (cairo_t) and probably the surface, after which no
further operation on the context or surface will have any effect; they are
inert.
The cairomm wrapper then checks the object error status after every call
and throws an exception if an error is detected.
Hope this helps and you are having fun using Cairo!
-ickle
--
Chris Wilson, Intel Open Source Technology Centre
More information about the cairo
mailing list