[plt-scheme] table-snip% implementation
Hi,
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?)
Cheers,
Stephen
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))