Change primitive X-GRAPHICS-COPY-AREA to accept both source and
authorArthur Gleckler <edu/mit/csail/zurich/arthur>
Mon, 20 Jul 1992 20:12:30 +0000 (20:12 +0000)
committerArthur Gleckler <edu/mit/csail/zurich/arthur>
Mon, 20 Jul 1992 20:12:30 +0000 (20:12 +0000)
destination windows.  Change X graphics operation COPY-AREA to pass
the same window for both parameters.

v7/src/microcode/version.h
v7/src/microcode/x11graph.c
v7/src/runtime/version.scm
v7/src/runtime/x11graph.scm
v8/src/microcode/version.h

index 7a406553cd072252be5259a425286b3a8ae22a1d..8efb908a7f8024aa39b7965e0927a3805d686624 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/version.h,v 11.116 1992/07/06 23:42:08 jinx Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/version.h,v 11.117 1992/07/20 20:12:30 arthur Exp $
 
 Copyright (c) 1988-1992 Massachusetts Institute of Technology
 
@@ -46,5 +46,5 @@ MIT in each case. */
 #define VERSION                11
 #endif
 #ifndef SUBVERSION
-#define SUBVERSION     116
+#define SUBVERSION     117
 #endif
index c8adb45fc4aec6592c7816b9f3e2a85d3c3222bc..2b6c25ce4a60a6b0fad8f06f4fa366a3b027660f 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/x11graph.c,v 1.27 1992/07/01 20:18:40 arthur Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/x11graph.c,v 1.28 1992/07/20 20:12:16 arthur Exp $
 
 Copyright (c) 1989-92 Massachusetts Institute of Technology
 
@@ -530,25 +530,38 @@ DEFINE_PRIMITIVE ("X-GRAPHICS-SET-DASHES", Prim_x_graphics_set_dashes, 3, 3, 0)
   PRIMITIVE_RETURN (UNSPECIFIC);
 }
 
-DEFINE_PRIMITIVE ("X-GRAPHICS-COPY-AREA", Prim_x_graphics_copy_area, 7, 7, 0)
+DEFINE_PRIMITIVE ("X-GRAPHICS-COPY-AREA", Prim_x_graphics_copy_area, 8, 8, 0)
 {
   PRIMITIVE_HEADER (7);
   {
-    struct xwindow * xw = x_window_arg (1);
-    unsigned int internal_border_width = (XW_INTERNAL_BORDER_WIDTH (xw));
-    float device_width = ((XW_X_SLOPE (xw)) * (arg_real_number (4)));
-    float device_height = ((XW_Y_SLOPE (xw)) * (arg_real_number (5)));
-
-    XCopyArea ((XW_DISPLAY (xw)),
-              (XW_WINDOW (xw)),
-              (XW_WINDOW (xw)),
-              (XW_NORMAL_GC (xw)),
-              (internal_border_width + (arg_x_coordinate (2, xw))),
-              (internal_border_width + (arg_y_coordinate (3, xw))),
+    struct xwindow * source_xw = x_window_arg (1);
+    struct xwindow * destination_xw = x_window_arg (2);
+    unsigned int source_internal_border_width
+      = (XW_INTERNAL_BORDER_WIDTH (source_xw));
+    unsigned int destination_internal_border_width
+      = (XW_INTERNAL_BORDER_WIDTH (destination_xw));
+    float device_width
+      = ((XW_X_SLOPE (source_xw)) * (arg_real_number (5)));
+    float device_height
+      = ((XW_Y_SLOPE (source_xw)) * (arg_real_number (6)));
+    Display *source_display = XW_DISPLAY (source_xw);
+    Display *destination_display = XW_DISPLAY (destination_xw);
+    if (source_display != destination_display)
+      error_bad_range_arg (2);
+    XCopyArea (source_display,
+              (XW_WINDOW (source_xw)),
+              (XW_WINDOW (destination_xw)),
+              (XW_NORMAL_GC (source_xw)),
+              (source_internal_border_width
+               + (arg_x_coordinate (3, source_xw))),
+              (source_internal_border_width
+               + (arg_y_coordinate (4, source_xw))),
               (ROUND_FLOAT (device_width)),
               (ROUND_FLOAT (device_height)),
-              (internal_border_width + (arg_x_coordinate (6, xw))),
-              (internal_border_width + (arg_y_coordinate (7, xw))));
+              (destination_internal_border_width
+               + (arg_x_coordinate (7, destination_xw))),
+              (destination_internal_border_width
+               + (arg_y_coordinate (8, destination_xw))));
     PRIMITIVE_RETURN (UNSPECIFIC);
   }
 }
index 54bb2a5950748d8ed4baa62fa0fb26297b2a1f1d..9f58553a3b2d4c7f5be7508aa07dcbd3430df407 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/version.scm,v 14.153 1992/05/26 20:33:14 mhwu Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/version.scm,v 14.154 1992/07/20 20:12:04 arthur Exp $
 
 Copyright (c) 1988-1992 Massachusetts Institute of Technology
 
@@ -45,7 +45,7 @@ MIT in each case. |#
                     '()))
   (add-system! microcode-system)
   (add-event-receiver! event:after-restore snarf-microcode-version!)
-  (add-identification! "Runtime" 14 153))
+  (add-identification! "Runtime" 14 154))
 
 (define microcode-system)
 
index 25274b7085085f27f53144733f891ca29592bcf7..4e0afa47d3b165398a923757ed17901a2213f4ce 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/x11graph.scm,v 1.22 1992/06/03 18:24:28 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/x11graph.scm,v 1.23 1992/07/20 20:12:21 arthur Exp $
 
 Copyright (c) 1989-92 Massachusetts Institute of Technology
 
@@ -76,7 +76,7 @@ MIT in each case. |#
   (x-window-x-size 1)
   (x-window-y-size 1)
 
-  (x-graphics-copy-area 7)
+  (x-graphics-copy-area 8)
   (x-graphics-drag-cursor 3)
   (x-graphics-draw-line 5)
   (x-graphics-draw-point 3)
@@ -591,10 +591,11 @@ MIT in each case. |#
                              source-x-left source-y-top
                              width height
                              destination-x-left destination-y-top)
-  (x-graphics-copy-area (x-graphics-device/xw device)
-                       source-x-left source-y-top
-                       width height
-                       destination-x-left destination-y-top))
+  (let ((xw (x-graphics-device/xw device)))
+    (x-graphics-copy-area xw xw
+                         source-x-left source-y-top
+                         width height
+                         destination-x-left destination-y-top)))
 
 (define (x-graphics/get-default device resource-name class-name)
   (x-display-get-default (x-graphics-device/xd device)
index be1a5b193d13e8af343e440133f048270964c677..d300b0ddcbc2a1308a561a862392971e984ae0fa 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/version.h,v 11.116 1992/07/06 23:42:08 jinx Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/version.h,v 11.117 1992/07/20 20:12:30 arthur Exp $
 
 Copyright (c) 1988-1992 Massachusetts Institute of Technology
 
@@ -46,5 +46,5 @@ MIT in each case. */
 #define VERSION                11
 #endif
 #ifndef SUBVERSION
-#define SUBVERSION     116
+#define SUBVERSION     117
 #endif