Experimental cairo port



Hi,

I did a conversion of gtkdatabox from deprecated gdk drawing functions to
cairo. On the plus side this gets gtkdatabox ready for gtk3 and also provides
smooth anti-aliased lines. E.g. http://metafoo.de/gtkdatabox_cairo.png shows
the gdk and the cairo version of example/basics2 running side by side.

On the negative side though it is almost a magnitude of order slower. This is
especially noticeable if many datapoints are drawn like in the rulers example.
A simple solution I've tried is to filter the points and skip points which
wouldn't be visible anyway, because they are identical to their predecessor.
Part of the problem though is that cairo requires a function for each point
which should be drawn. This results in a huge overhead, so another solution
would be to use a cairo image surface and implement our own drawing functions
and do raw pixel access.

I've pushed the port to my git repo at git://git.metafoo.de/gtkdatabox/
And the commit in question can also be viewed at
http://git.metafoo.de/?p=gtkdatabox;a=commit;h=2bf91156456d8ed4de98a6c9e9413f227f0233f0

- Lars


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