[plt-scheme] table-snip% implementation

From: Stephen De Gabrielle (spdegabrielle at gmail.com)
Date: Mon Aug 4 11:20:59 EDT 2008


Thanks to Matthew I have added another dodgy package to planet.

  (require (planet "table-snip.ss" ("spdegabrielle" "table-snip.plt" 1 0)))

 code/appropriateness to planet/

any comments on appreciated (code? appropriateness to planet?)



On Mon, Aug 4, 2008 at 12:54 PM, Matthew Flatt <mflatt at cs.utah.edu> wrote:
> When `draw' is called, the snip's font is already set in the DC. When
> `get-extent' is called, the font is not automatically set.
> So, to get the right size, you need to specify the font in
> `get-extent':
>  (inherit get-style) ....
>  (send dc get-text-extent (format "~A" my-string)
>                          (send (get-style) get-font))

Posted on the users mailing list.