On 05.08.2011 03:34, Evan Laforge wrote: > 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)
I understand that what you tried is another approach (usning the transformation matrix), and that's worth taking a look at anyway. Maybe someone else (probably Manolo) can say something about this. FYI, FLTK 1.3 already has the capability of drawing rotated text in fl_draw(int angle, ...) for "normal" text drawing (w/o transformation matrix). Maybe this can help you too. Does test/rotated_text work on OS X? IMHO it ought to, but I can't test it right now. <http://www.fltk.org/doc-1.3/group__fl__drawings.html#ga14f28b302c1adf1f6dc76efbd6275a50> Albrecht _______________________________________________ fltk-dev mailing list fltk-dev@easysw.com http://lists.easysw.com/mailman/listinfo/fltk-dev