Carl Worth <cworth <at> cworth.org> writes: > I'm quite convinced that using floating-point at the interface, and > fixed-point internally as needed provides the right combination of > performance and ease-of-use for cairo. I'd highly recommend any new > canvas interfaces being proposed follow the same approach. > A huge advantage that a cairo-like API has over a canvas is that it has far less interaction using the interfaces. In cairo the interfacing goes like this: -> create surface -> draw In a canvas it goes like this: -> add item <- query size -> answer size request <- allocate size <- send event -> answer event ... So there's a lot more situations where you have to pass doubles.
That being said, I'll trust doubles being slow when I see the numbers. There have been a lot of complaints about cairo's usage of doubles when it wasn't even an issue. [1] But the most important issue for a canvas is its API. If I have to know all sorts of internal things (like what sort of fixed point magic to apply) to get a canvas item coded, I'm not gonna code a canvas item. And without canvas items a canvas is pretty boring. Noone cares about text entries and rectangles. Benjamin [1] http://blogs.gnome.org/view/xan/2006/11/06/0 - compare the green and the blue bar _______________________________________________ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list