This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: (kawa pictures) square-limit pictures


> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]