[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] estimating printed width of some text



bart.mediamind@tornado.be (Bart Lateur) writes:
>There might even be a Toolbox call that will calculate the printed width
>for the whole string. I know that Windows (even 3.1) has such an API
>call. Is there an equivalent for the Mac?

Try Mac::QuickDraw::StringWidth, but be sure to set up a valid GrafPort before
calling it.

>More general question: what is the recommended way of converting source
>code found in Inside Macintosch, into MacPerl calls?

 - Look whether the call already exists.
 - If it does, look how the calling conventions differ & use it.
 - If it doesn't, complain to the list. The squeaky Toolbox Manager gets the
   glue, eventually. 

Matthias

-- 
Matthias Neeracher   <neeri@iis.ee.ethz.ch>   http://www.iis.ee.ethz.ch/~neeri
        "You mean you don't use machine guns in _your_ pictures?"  
                         -- Charles Bronson to Ingmar Bergman,
                            according to bradham@panix.com (Bo Bradham)

***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch