[cairo] Error: Target surface has been finished

Evan White talguy385 at gmail.com
Sun Jan 25 12:12:44 PST 2009


Ok, so what i really should do is have my signal some how point to my 
expose event and re-expose the drawing surface every time i receive some 
type of data doesn't matter if its from my test file or when I'm 
actually using serial/usb to communicate with our hardware.  my one 
question is how would i have it re-expose the window based on a new line 
of data coming in?

 >> Well, I don't see any direct calls to drawGuage in your signal_io 
callback

drawGauge was called in processSpeed after i processed the value 
received and translated it into and angle.

 >> As a general rule of thumb, *never* draw anything to the screen 
outside of an expose event.

I broke up my objects that are to be drawn to the screen into separate 
methods so that I could draw one thing instead of another based on the 
input I anticipated to receive


This is just a default gauge screen I am working on the main goal for 
our project is to allow the user to pick and choose how they would like 
their instrument cluster to be arranged.  we plan to use an XML file to 
define a custom skin that they make using PNG files.  also the user will 
be able to setup multiple scenes so that they could change their gauge 
configuration on the fly based on some input.  Could you give me some 
pointers on how best to accomplish this, where each gauge is its own c++ 
object so is each scene.

Evan


More information about the cairo mailing list