Fixed to correspond to new Image abstraction
authorStephen Adams <edu/mit/csail/zurich/adams>
Tue, 9 Nov 1993 21:20:02 +0000 (21:20 +0000)
committerStephen Adams <edu/mit/csail/zurich/adams>
Tue, 9 Nov 1993 21:20:02 +0000 (21:20 +0000)
v7/src/6001/pic-reco.scm
v7/src/6001/picture.scm

index aad57b67ac53226190ebedf771f19040f9864cda..93302727dfa77be1ef717ca9d815217be80953e7 100644 (file)
@@ -52,8 +52,8 @@
 
 (define (picture-set-image! picture image)
   (let ((img (picture-image picture)))
-    (if (x-image? img)
-       (x-image/destroy img))
+    (if (image? img)
+       (image/destroy img))
     (%picture-set-image! picture image)))
 
 (define (picture-min picture)
   (%picture-set-min! picture #f)
   (%picture-set-max! picture #f)
   (let ((img (picture-image picture)))
-    (if (x-image? img)
-       (x-image/destroy img))
+    (if (image? img)
+       (image/destroy img))
     (%picture-set-image! picture '())))
 
 (define (find-min-max picture)
index ab1e3620cab4b8c0e506c365e4e28dc148c719f6..c24191c6d3595fa52b3e4c3e4d5c646e45a2d4bc 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/6001/picture.scm,v 1.18 1993/01/12 21:30:52 gjs Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/6001/picture.scm,v 1.19 1993/11/09 21:20:02 adams Exp $
 
 Copyright (c) 1991-92 Massachusetts Institute of Technology
 
@@ -238,13 +238,13 @@ MIT in each case. |#
 \f
 (define (picture-display window pic #!optional pic-min pic-max)
   (define (check-image pic window brick-wid brick-hgt)
-    (if (x-image? (picture-image pic))
+    (if (image? (picture-image pic))
        (let ((image (picture-image pic)))
          (and (1d-table/get (graphics-device/properties window) image #f)
               (fix:= (fix:* (picture-width pic) brick-wid) 
-                     (x-image/width image))
+                     (image/width image))
               (fix:= (fix:* (picture-height pic) brick-hgt) 
-                     (x-image/height image))))
+                     (image/height image))))
        #f))
 
   (with-values 
@@ -278,9 +278,10 @@ MIT in each case. |#
                                         brick-wid brick-hgt
                                         pic-min pic-max))))
              (graphics-clear window)
-             (x-image/draw image 
+             (graphics-operation window 'draw-image
                            (quotient h-margin 2)
-                           (quotient v-margin 2))
+                           (quotient v-margin 2)
+                           image)
              (if (and true-min-max? (not image-cached?))
                  (picture-set-image! pic image))))))))