This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Re: (kawa pictures) square-limit pictures
- From: "Sudarshan S Chawathe" <chaw at eip10 dot org>
- To: Per Bothner <per at bothner dot com>
- Cc: kawa <kawa at sourceware dot org>
- Date: Mon, 31 Oct 2016 18:11:36 -0400
- Subject: Re: (kawa pictures) square-limit pictures
- Authentication-results: sourceware.org; auth=none
- Reply-to: "Sudarshan S Chawathe" <chaw at eip10 dot org>
> I've considered adding a procedure to help bridge the SICP
> model and the Kawa model. Something like:
>
> (transform-to RECT PICTURE)
>
> This would be equivalent to some (with-transform TRANSFORM PICTURE)
> such that the bounds of the result matches RECT.
This procedure would be nice to have.
> More generally RECT could be a parallelogram. (Note a rotated rectangle is
> a parallelogram but is not considered a rectangle.) In that case the
> bounds of the transform would not match RECT, but would have the
> same bounds as RECT.
>
> The RECT corresponds to the "frame" of SICP.
On a related note, regarding Racket's sicp-pict package you noted
earlier: Based on a quick look at the source code, it seems to use a
bitmapped drawing canvas as the basis for segments->picture from SICP,
with the other SICP procedures being mostly verbatim (with some flipped
names, such as frame-edge1 instead of edge1-frame, I assume to conform
to current Scheme naming conventions).
I'm thinking of writing something similar with Kawa. Actually I have a
lot of it done, but I'm working on how best to hook things into the Kawa
graphics interface. (The way I did it earlier was a bad hack.)
Regards,
-chaw