How to shift surface?



Hello!

I am trying to write a gtk + Cairo application that mimics the animation in 
wikipedias sine graph.

https://en.wikipedia.org/wiki/File:Circle_cos_sin.gif

I want to draw a point and then shift the surface to the left, and then draw a new point,
and shift again. I have done this with pixmaps, but I cant figure it out with Cairo.

Is offset the way to go?

cairo_surface_set_device_offset (surface, offset_x, offset_y);

/gh

-- 
Göran Hasse
Raditex Control AB
Boo 229
715 91 ODENSBACKEN
http://www.rscada.se
OrgNr: 556611-8773
email: gorhas raditex nu
tel: 019-450105
mob: 070-5530148
Lat:  59.18805083 Long: 15.50300449
URL: http://alturl.com/3e6hf


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]