¡@

Home 

2014/10/15 ¤U¤È 10:04:08

iphone Programming Glossary: atsui

iPhone SDK: How do you measure the width and height of a string using Quartz?

http://stackoverflow.com/questions/913470/iphone-sdk-how-do-you-measure-the-width-and-height-of-a-string-using-quartz

to your application it is possible to calculate them using Quartz 2D functions. However you might first consider using ATSUI whose strength is in text layout and measurement. ATSUI has several functions that obtain text metrics. Not only can you.. Quartz 2D functions. However you might first consider using ATSUI whose strength is in text layout and measurement. ATSUI has several functions that obtain text metrics. Not only can you obtain after layout text metrics but in the rare cases.. them you can obtain before layout text metrics. Unlike Quartz for which you must perform the calculations yourself ATSUI computes the measurements for you. For example you can obtain the image bounding rectangle for text by calling the ATSUI..