On Nov 18, 2008, at 1:57 PM, Rua Haszard Morris wrote:

What are the different options for flipping the coordinates of the destination view? I've tried doing it by scaling and translating the CGContext, but this results in problems with underlining or the character orientation (depending on whether i flip the view back before or after drawing the text).

At the moment the only method which results in correct text is to have a custom view and override isFlipped - is this the only recommended method?

I ask because I have to use these strings within custom views (which may for example have rotated contexts), as well as in standard controls, and simpler custom views purely for drawing these attributed strings. If the only method to have the attributes (particularly underline) interpreted correctly is to perform the drawing in a isFlipped NSView subclass, then I need to rejig things so the complex custom views embed an NSView rather than draw the attributed string manually.

The other alternative would be to use the NSStringDrawing APIs instead of using NSLayoutManager directly.

Douglas Davidson

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to