J john903 macrumors member Original poster Apr 11, 2008 66 0 Aug 24, 2008 #1 I doing text drawing with CGContextShowTextAtPoint. How do I get the width and height in pixels of the drawn text?
I doing text drawing with CGContextShowTextAtPoint. How do I get the width and height in pixels of the drawn text?
K kainjow Moderator emeritus Jun 15, 2000 7,958 7 Aug 25, 2008 #2 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).
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).