From 877b54dea92a627c84f59760873f202e797a72dd Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Tue, 13 Oct 2009 23:06:24 +0000 Subject: [PATCH] rearranged things so that 2htdp/image has its core snip stuff loaded into drscheme so that saving files with 2htdp/image images in them works svn: r16317 original commit: 11e87632dc15601cc08c25e5cad5e3457e09d446 --- .../{2htdp/private => mrlib}/image-core.ss | 51 ++++--------------- 1 file changed, 9 insertions(+), 42 deletions(-) rename collects/{2htdp/private => mrlib}/image-core.ss (93%) diff --git a/collects/2htdp/private/image-core.ss b/collects/mrlib/image-core.ss similarity index 93% rename from collects/2htdp/private/image-core.ss rename to collects/mrlib/image-core.ss index 1c7a9ba2..45bfe027 100644 --- a/collects/2htdp/private/image-core.ss +++ b/collects/mrlib/image-core.ss @@ -2,57 +2,24 @@ #| -Need to test copy & paste. Also test that if the "if" -expression in image-snipclass%'s read -method returns #f, then you get a black circle out. - ---- - -improvments/changes wrt to htdp/image: - - - copying and pasting does not introduce jaggies - - equal comparisions are more efficient - - added rotation & scaling - - got rid of pinholes (see the new overlay, beside, and above functions) - -Equality change: equality is now based on the structure of the construction of the picture. -This means that some equalities that were there before are no longer true. For example, -in the old library, these two images are the same: - - (overlay/xy (rectangle 100 10 'solid 'red) - 0 - 10 - (rectangle 100 10 'solid 'red)) - - (rectangle 100 20 'solid 'red) - -... and why aren't they the same again....?! - -todo: sort out wxme library support (loading in text mode). - ------------- - -From Matthias: (to use to compare with this library) - - -You asked about exercises and code snippets for HtDP/2e yesterday. I actually do have a bunch of stuff in - - svn: 2HtDP/SampleCode/ - -and they all have good sample contracts. (It is amazing what we can do with kids who have just a few weeks of cs down; I would have never dared to write an editor after six weeks in Algol.) +This library is the part of the 2htdp/image +teachpack that has to be shared between drscheme +and the user's program to make copy and paste +work right. +Most of the exports are jsut for use in 2htdp/image +(technically, 2htdp/private/image-more). The main +use of this library is the snip class addition it +does (and any code that that does not depend on +has been moved out). |# - (require scheme/class scheme/gui/base scheme/math (for-syntax scheme/base)) - - - (define-for-syntax id-constructor-pairs '()) (define-for-syntax (add-id-constructor-pair a b) (set! id-constructor-pairs (cons (list a b) id-constructor-pairs)))