[cairo] Basic question about drawing a moving line over a detailed background in mono c# program

Alan Battersby alan.battersby at ntlworld.com
Fri Nov 6 07:18:50 PST 2009


Hi everyone,
I am fairly new to using cairo, I understand the basic stuff but have a
question. What is the most efficient way of moving a line drawn from the
centre of a drawingarea to the current mouse position over a detailed
drawn background?  I am sure this is a basic question that many have
asked in the past and I have looked at the tutorial material but couldnt
see anything to help(probably looking in the wrong place).

I have written the code to draw the line but it involves continually
clearing the screen and re-drawing everything which is quite slow. In
the past I have used Xor drawing but understand this is not how its done
now.

So how can I save the background drawing whilst the mouse is moving?
Should it be to an image or is there some in memory structure I can use?

Thanks

Alan


More information about the cairo mailing list