Apple Systems and Services
> size of text drawn with CGContextShowTextAtPoint
View Full Version :
size of text drawn with CGContextShowTextAtPoint
Aug 24, 2008, 03:34 PM
I doing text drawing with CGContextShowTextAtPoint. How do I get the width and height in pixels of the drawn text?
Aug 26, 2008, 12:41 AM
If you're using Cocoa you can use NSAttributedString to get the size. I'm not sure of a pure C-based way of doing it though (maybe somehow with CFMutableString).