So, I want to draw some text rotated 90 degrees. There's fl_rotate, but the documentation also says whether fl_draw is affected is implementation defined. And sure enough, on OS X, it's not. The thing is that OS X is perfectly capable of drawing rotated text, and in fact I was able to rotate all text by replacing the call CGContextSetTextMatrix(fl_gc, font_mx); inside fl_font_mac.cxx:fl_mac_draw with the appropriate transform: CGAffineTransformMakeRotation(degrees * M_PI / 180)
It looks like I could pull the fltk matrix out of the 'm' attribute of Fl_Graphics_Driver (BTW, those single letter global names that fltk is so in love with really makes it hard to search for their use, or understand when they are when they are used). It's private, but I could poke around a little bit more to see how 'm' is meant to be used, and pull it out for fl_mac_draw. Does this seem like a reasonable thing to do? I'm pretty sure the other platforms are capable of supporting rotation, it would be nice to change that "implementation defined" into "supported". _______________________________________________ fltk-dev mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk-dev
