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

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

[Bug-mit-scheme] Bug in X11 graphics--10.1.6


From: Gerald Jay Sussman
Subject: [Bug-mit-scheme] Bug in X11 graphics--10.1.6
Date: Sat, 27 Apr 2019 23:44:07 -0400

There is a very annoying bug in 10.1.6.  Here is the actual
problem that I isolated in the sources.

In x11-device.scm the following code appears:

(define (x-graphics/draw-arc device x y radius-x radius-y
                             angle-start angle-sweep fill?)
  (x-graphics-draw-arc (x-graphics-device/xw device)
                       (->flonum x)
                       (->flonum y)
                       (->flonum radius-x)
                       (->flonum radius-y)
                       (->flonum angle-start)
                       (->flonum angle-sweep)
                       fill?))

(define (x-graphics/draw-circle device x y radius)
  (x-graphics-draw-arc (x-graphics-device/xw device)
                       (->flonum x)
                       (->flonum y)
                       (->flonum radius)
                       (->flonum radius)
                       0.
                       360.
                       #f))

(define (x-graphics/fill-circle device x y radius)
  (x-graphics-draw-arc (x-graphics-device/xw device)
                       (->flonum x)
                       (->flonum y)
                       (->flonum radius)
                       (->flonum radius)
                       0.
                       360.
                       #t))

All the calls to x-graphics-draw-arc have 8 arguments.

But the definition of this procedure, in x11-graphics.scm
takes only 6 arguments:

(define (x-graphics-draw-arc window x y start-angle sweep-angle fill?)
  ;; Draw an arc at the given coordinates, with given X and Y radii.
  ;; START-ANGLE and SWEEP-ANGLE are in degrees, anti-clocwise.
  ;; START-ANGLE is from 3 o'clock, and SWEEP-ANGLE is relative to the
  ;; START-ANGLE.  If FILL? is true, the arc is filled.
  (C-call "x_graphics_draw_arc" window
          x y start-angle sweep-angle (if fill? 1 0)))



reply via email to

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