Version 1 of XLEL

Updated 2007-03-07 23:42:51

The Xlib Emulation Layer is Tk's traditional mechanism for factoring cross-platform support. Replacement of XLEL is, in one sense, the main aim of TkGS, a project initiated by Frederic Bonnet.


Lars H, 8 March 2007: I just encountered an awkward misfeature of this XLEL: Coordinates of lines drawn on the canvas will be rounded to integers! Sure enough, the canvas stores item coordinates as floats (doubles, even), and Aqua (or Quartz 2D [L1 ], if we're technical) thinks a point is a pair of floats too, but on its way from one to the other it has to pass through the Xlib Emulation Layer, and Xlib thinks a point is a pair of integers (shorts, even), so any subpixel precision is lost.

While this is not a show-stopper, it does put some restrictions on the kind of things one can do on the canvas. It is probably also relevant for any discussion of antialiasing in Tk, but I don't know whether it would be pro or con...


[ Category Tk Library | Category Glossary ]