From: Donal K. F. <don...@ma...> - 2003-12-17 10:29:21
|
Jim Ingham wrote: > But (more nitpicking) if there isn't actually an X11 function that we > are emulating, I would rather not pretend that the function is part of > the X11 library that we are emulating on Mac & Windows. It would be > clearer to use a Tkp interface in the generic code in this case I > think... I picked that nit too (as part of my fifth point). :-) > Again, this is trivial on Mac OS X (just rotate the context & draw). > As long as we hide the guts behind a functional interface, this is > fine... I had a very strong suspicion that was true. The general approach of "put all the nasty stuff behind a nice neat interface" is a very good one which is used a lot of other places through the whole core. At the highest level, we'd add an argument to the APIs to draw text to specify the angle (we'd do this using new stub slots, and provide a set of backward compatability APIs selectable with a #def for people who don't want to modify their old code.) Underneath that, we'd either implement it directly where we have support (e.g. on OSX) or use compatability code where we do not (older X11) but that'd all be transparent to the higher level code. Generating PS for rotated canvas text is also trivial. (Anyone working on the compatability code should probably look out for the cardinal rotations and handle those specially. But I've not checked Simon's code to see if that is actually done. ;-) ) Donal. |