Hi Evan, On 24 Oct 2012, at 20:26, Evan Laforge wrote:
> fl_draw has some hardcoded support for rotating text, but what about > scaling? Well, scaling along one axis, obviously scaling on both axes > is wel supported :) I noticed that whether or not it pays attention > to the transformation matrix is undefined, and on OS X at least, it > doesn't. Does anyone know of the top of their head if there is some > way to stretch text vertically or horizontally? If you are happy with a nasty(ish) looking hack, then a while back, in response to a forum question, I posted a working example that simply wrote the text into an offscreen then stretch-blited that onto the screen, allowing for vertical or horizontal stretching... Didn't look all the great at large scales mind you! However, I suspect you want something more elegant that takes advantages of the anti-aliasing inherent in proper text rendering engines... Still, it will be in the archives somewhere, or I can post the code again tomorrow if I can find (and if you are interested!) > A brief look at the Cocoa docs yields this page: > http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/CocoaDrawingGuide/Transforms/Transforms.html > > It implies that the current transformation matrix applies to text too, > which implies that if the fltk transformation matrix maps directly to > the OS X one then this support should come for free. However, if this > can't be supported on other platforms, perhaps the cocoa fl_draw > explicitly disables the transformation matrix for the sake of > consistency. In that case, it would be nice to have an escape hatch > explicitly marked as non-portable, with perhaps a TODO to see if this > can't be extended to all platforms. My understanding is that over the > years X and Windows get fancier drawing systems that tends to bring > them towards the OS X level of fanciness. I suspect (but am not certain) that it is possible on all platforms (XFT will support a transform matrix, for example, and which I think might also allow scaling per-axis) and ISTR that the WIN32 API can too. So... the kicker may mainly be that no one has done the work? Cheers, -- Ian _______________________________________________ fltk-dev mailing list fltk-dev@easysw.com http://lists.easysw.com/mailman/listinfo/fltk-dev