[cairo] Transformations usage

Daniele Dario d.dario76 at gmail.com
Mon Dec 11 12:31:59 UTC 2017


Hi Eric,
thanks a lot for the examples :-)

After a lot of tries and with the help of Bill, I got something working
finally.

The map background doesn't change so the idea to draw it once and save
it on a surface. Than the operations will just be
translations/rotations to update view.

Again thanks,
Daniele.

On Wed, 2017-12-06 at 14:03 -0500, cecashon at aol.com wrote:
> 
> 
> Hi Daniele,
> 
> Is the map background coming from a file or a pixbuf, or are you
> drawing the map entirely with Cairo?
> 
> Cairo can draw pretty fast so usually you don't have to worry about
> storing a surface and reusing it in GTK. A good technique though. If
> you draw a complicated background that doesn't change often, it can
> speed drawing up. There is a GTK gauge widget that uses some of those
> ideas.
> 
> https://github.com/cecashon/OrderedSetVelociRaptor/tree/master/Misc/A
> djustableGauge
> 
> For transformations, there is a GTK drawing program that might be
> helpful.
> 
> https://github.com/cecashon/OrderedSetVelociRaptor/blob/master/Misc/c
> airo_drawings/bezier_points1.c
> 
> It will draw polygons and let you drag points around for interactive
> drawing along with transforms and animation. If you are using Cairo
> to draw everything with transforms it might give you some ideas.
> 
> Eric
> 


More information about the cairo mailing list