Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
behind the scenes of -drawInRect:
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

behind the scenes of -drawInRect:



Can anyone share a bit of the implementation details behind - [NSArrtibutedString drawInRect:]? I'm using it in -[NSView drawRect:] to place some text for printing.

I need to know the outputted text's height, but -[NSLayoutManager usedRectForTextContainer:] mysteriously cuts off the bottom 1/3 of the last line or two (depending on the size of the string). I figure this must be because of some sort of padding that's added to the string in -drawRect:, but I can't find any details as to how - drawRect: renders the text, so I don't know what variables I need to account for.


Thanks, -Joshua Emmons _______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.