string height?
Joern Eyrich
Joern.Eyrich at syngenio.de
Sat May 25 19:06:49 UTC 2002
Niko,
it seems that if you don't specify a font yourself (by using for example Canvas>>drawString:at:font:color:), "TextStyle defaultFont" will be used.
To display something in the lower left corner, for example,
HeadingMorph>>drawOn: aCanvas
...
aCanvas drawString: 'Hugo'
at: self bounds left @ (self bounds bottom - (TextStyle defaultFont height) - 1)
works for me.
HTH,
Joern
Niko Schwarz wrote:
> For drawing on the HeadingMorph, I'd like to use the drawString: at: method of
> Canvas. But: the at vastly depends on the string height, isnt it?
> how can i find out that height for a given string?
>
> (i know theres Font height, but how to find the font?)
More information about the Squeak-dev
mailing list
|