bug-mit-scheme
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-mit-scheme] x11 graphics doesn't quite work.


From: Gerald Jay Sussman
Subject: [Bug-mit-scheme] x11 graphics doesn't quite work.
Date: Sat, 19 Jan 2019 21:26:33 -0500

This matters to me, since I use MIT/GNU Scheme for teaching.
Here is a transcript of bad behavior.  I installed the 10.1.4
system on my Ubuntu 16.04 laptop using the standard instructions
published on the GNU web page.  I am running under EMACS.

The first thing to notice is that I had to load the x11-screen option.
This is OK, but even after that, I had to (import-x11), which is not in
the manual.  That is an odd thing to need, given that the x11 type is
specified in the reference manual.

But, accepting that, I still had bad results.  Apparently
graphics-set-clip-rectangle and graphics-coordinate-limits both lose
badly.  Please fix x11 graphics.  I need it!

-------------------------------------------------------

MIT/GNU Scheme running under GNU/Linux

Copyright (C) 2019 Massachusetts Institute of Technology
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Image saved on Sunday January 6, 2019 at 6:10:24 PM
  Release 10.1.4    || Microcode 15.3 || Runtime 15.7 || SF 4.41
  LIAR/x86-64 4.118

(enumerate-graphics-types)
;Value: ()

(load-option 'x11-screen)
;Loading "make.scm"...
;  Loading "make.scm"...
;    Loading "x11-unx.pkd"... done
;;; ... Many files loaded!
;  Loading "x11-key.com"... done
;  Loading "x11-command.com"... done
;... done
;Value: x11-screen

(enumerate-graphics-types)
;Value: (#[graphics-type 12 x11])

(define foo 
  (make-window/X11 400 400 0 0))
;Unbound variable: make-window/x11

(import-x11)
;Unspecified return value

(define foo 
  (make-graphics-device 'x11
                        #f
                        (x-geometry-string 0 0 400 400)
                        #t))
;Unspecified return value

(x-graphics/disable-keyboard-focus foo)
;Unspecified return value

(x-graphics/set-input-hint foo #f)
;Unspecified return value

(x-graphics/map-window foo)
;Unspecified return value

(x-graphics/flush foo)
;Unspecified return value

(graphics-operation foo 'set-background-color "black")
;Unspecified return value

(graphics-operation foo 'set-foreground-color "green")
;Unspecified return value

(graphics-clear foo)
;Unspecified return value

(graphics-operation foo 'set-mouse-color "orange")
;Unspecified return value

(graphics-clear foo)
;Unspecified return value

(graphics-operation foo 'set-window-name "foosh")
;Unspecified return value

(graphics-set-coordinate-limits foo 0 (- (- 400 1)) (- 400 1) 0)
;Unspecified return value

(call-with-values 
    (lambda ()
      (graphics-device-coordinate-limits foo))
  list)
;Value: (0 399 399 0)

(graphics-draw-point foo 178 -193)
;Unspecified return value

(graphics-set-clip-rectangle foo 0.0 0.0 1.0 1.0)
;The object 0., passed as the third argument to c-call, is not the
;correct type.
;Quit!

(call-with-values (lambda () (graphics-coordinate-limits foo))
  list)
;The procedure #[compiled-procedure 13 ("x11-graphics" #x2) #x1a
;#x36528da] has been called with 1 argument; it requires exactly 2
;arguments.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]