On Mon, 2007-04-23 at 19:19 -0400, Damon Chaplin wrote: > > But the cairo API already uses doubles, for coordinates and > transformations. So if the canvas used fixed point numbers you'd be > converting to doubles and then back again. With 32-bit fixed point > numbers you also cut down the maximum possible size of the canvas, > plus > you lose the precision of doubles (which may be important for some > data > visualization apps).
I completely agree here with Damon. With fixed point api, bug reports will come in very soon that "if I zoom in 1000x on a point and try to move it, it jumps around...". We've had similar reports when people tried to port Inkscape to cairo, because cairo uses a 16.16 fixed point internally. When you are locked with fixed point, it would be really hard to get out of it. On the other hand, since cairo has double api already and we don't see adding fixedpoint api any time soon, the canvas can do a good job at avoiding floating-point arithmetic completely and use cairo transformations for all the work. And we have been optimizing cairo as much as possible to make this usecase fast for example for non-scale non-rotation matrices. Doing affine transformations completely in fixedpoint is very hard, and probably even impossible to support extreme zoom factors with. -- behdad http://behdad.org/ "Those who would give up Essential Liberty to purchase a little Temporary Safety, deserve neither Liberty nor Safety." -- Benjamin Franklin, 1759 _______________________________________________ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list