[plt-scheme] determining sizes of pict
David Richards wrote:
>
> Given:
>
>
> (require (lib "mrpict.ss" "texpict"))
>
> (define dc (new bitmap-dc% (bitmap #f)))
>
> (dc-for-text-size dc)
>
> (define p (text "Hello World" null 24))
>
>
> How would we determine the height, width, ascent, descent of the
> #<struct:pict> ?
The docs for Texpict collections says that
A pict is an instance of the `pict' structure type:
> struct:pict :: (struct pict (draw width height ascent descent
children panbox))
so you can use pict-width, pict-height, pict-ascent and pict-descent.
--
Jens Axel Søgaard