Bug in draw-circle using transformation

Bug #494733 reported by Christophe Rhodes
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
McCLIM
Confirmed
Medium
Unassigned

Bug Description

Report from Paul Werkowski

 affects mcclim
 status confirmed
 importance medium
 tag transformation draw-circle*
 done

(in-package :clim-user)

;;; In Lispworks CLIM, this program draws an arc (counter-clockwise)
;;; from red dot to blue dot.
;;; In McCLIM, xlib:draw-arc throws a type error,
;;; 7.85398 is not of type (satisfies xlib:anglep)
;;; Changing start angle (as) to zero gets past that error, but the arc
;;; is going in the wrong direction (clockwise) from red dot.

(define-application-frame test ()
  ()
  (:panes
   (p0 :application
       :display-function
       (lambda (f p)
  (declare (ignore f))
  (with-translation (p 10 150)
    (with-scaling (p 1 -1)
             (let* ((as (/ pi 8))
                    (ae (+ as (/ pi 2)))
                    (r 20)
                    (x0 50)(y0 50)
                    (xs (+ x0 (* r (cos as))))
                    (ys (+ y0 (* r (sin as))))
                    (xe (+ x0 (* r (cos ae))))
                    (ye (+ y0 (* r (sin ae)))))
               (draw-line* p 0 0 0 100)
               (draw-line* p 0 0 100 0)
               ;; Arc center
               (draw-circle* p x0 y0 3 :ink +green+)
               ;; Where the arc should start
               (draw-circle* p xs ys 3 :ink +red+)
               ;; Where the arc should end
               (draw-circle* p xe ye 3 :ink +blue+)
               (draw-circle* p x0 y0 r
                             :start-angle as :end-angle ae :filled nil)))))
       :width 200 :height 200))
  (:layouts
   (default p0)))

(defun testme ()
  (run-frame-top-level
   (make-application-frame 'test)))

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.