[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: string-width error?
- To: firstname.lastname@example.org
- Subject: Re: string-width error?
- From: email@example.com (Richard Lynch)
- Date: 8 Feb 1995 22:49:47 GMT
- Organization: ILS
- References: <firstname.lastname@example.org>
- Sender: email@example.com
In article <firstname.lastname@example.org>,
John_Gersh@aplmail.jhuapl.edu (John R. Gersh) wrote:
|>A little testing reveals that string-width only uses the first 255
|>characters in its argument string to calculate the pixel width; any
|>characters beyond that are ignored. This is probably a reasonable limit for
|>most screen and font sizes, but it seems to be an undocumented one.
|I meant, of course, undocumented in the MCL docs. A little research in
|Inside Mac reveals that the _StringWidth toolbox call takes a str255
|argument. For those of us who use MCL to avoid dealing with the Mac
|infrastructure as much as possible, coming up against such limits may still
|be a bit of a surprise.
Using MCL as a buffer from the Mac infrastructure is an excellent
However, in practice, keep in mind the following:
eg: (line-to self h v) vs. (#_LineTo h v)
Assuming each of the above is appearing in view-draw-contents, the latter
is *MUCH* faster and no more difficult to read/write.
Moral: If you can quickly understand a trap call [both in writing and
later reading the code], use it.
-- "TANSTAAFL" Rich email@example.com