CLIM mail archive

[Prev][Next][Index][Thread]

Computing the Label Size



[ALLEGRO/CLIM2/SPARC]

The function SILICA:COMPUTE-GADGET-LABEL-SIZE[*] should (I assume) return
the width and height that would be used if the label of a gadget is drawn.

However, the values I get are noticably larger than the space actually used
by the label-string (in particular, the height is about 5 pixles larger
than the size of the actual string when it is drawn).  My guess would be
that some sort of surrounding buffering/bordering is being factored into
the size the function returns.

Is this the case?  If so, is there some way the amount of buffering can be
functionally determined (otherwise it makes it somewhat difficult to lay
the label with much precision).

Thanks
Nichael


[* As an aside, it is important SILICA:COMPUTE-GADGET-LABEL-SIZE in certain
   cases, for example inside COMPOSE-SPACE which can be called before the  
   pane/medium is set up and where a call to, say, TEXT-SIZE would cause a 
   nasty error.]


Main Index | Thread Index