CLIM mail archive

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

No circle-segments with CLIM?




;Hello CLIMer,
;I have some troubles with the drawing-circle function. It works well, if
;I want to draw full circles, not specifying start- and end-angle. If I
;give values to these keywords the debugger always tells me:

;Trap: The function CLIM-UTILS::NYI is undefined.
;CLIM-UTILS:ELLIPTICAL-ARC-BOX
;   Arg 0 (CLIM-UTILS::CENTER-X): 50
;   Arg 1 (CLIM-UTILS::CENTER-Y): 50
;   Arg 2 (CLIM-UTILS::RADIUS-1-DX): 50
;   Arg 3 (CLIM-UTILS::RADIUS-1-DY): 0
;   Arg 4 (CLIM-UTILS::RADIUS-2-DX): 0
;   Arg 5 (CLIM-UTILS::RADIUS-2-DY): 50
;   Arg 6 (CLIM-UTILS::THETA-1): 4.712398980384437d0
;   Arg 7 (CLIM-UTILS::THETA-2): 1.570797326794894d0
;   Arg 8 (CLIM-UTILS::THICKNESS): NIL
;s-A, <Resume>  Supply a value to use this time as the definition of CLIM-UTILS::NYI
;s-B, s-sh-C:   Supply a value to store permanently as the definition of CLIM-UTILS::NYI
;s-C:           Retry the CALL-INDIRECT instruction
;s-D:           Retry displaying pane #<CLIM::CLX-WINDOW /x 0:400 y 18:259/ 140044156>
;s-E:           Skip redisplaying pane #<CLIM::CLX-WINDOW /x 0:400 y 18:259/ 140044156>
;s-F:           Myapp1 top level
;s-G:           Exit Myapp1
;s-H, <Abort>   Exit process task


;Very mysterious: the new-cad-demo (one of the example programs) draws half-circles
;(not exact half-circles, they add a small number to start- and end-angle, because of
;some troubles with half-circles they had!). I copied the source-code, set the package
;to CLIM-DEMO but it don't work!

;Can anybody help me ?

;Future thanks, Ralf.

;The (not working) code:

;;; -*- Syntax: Common-Lisp; Mode: LISP; Package: CLIM-DEMO -*-

(defvar *component-start-angle* (+ #+genera .00001 (* pi 3/2)))
(defvar *component-end-angle* (+ #+genera .000001 (* pi 1/2)))

(define-application-frame myapp1 ()
    ()
     (:panes
       ((menu :command-menu)
	(main :application
	      :scroll-bars :vertical
	      :display-function 'display-main1
	      :display-after-commands nil)
	(interactor :interactor))))

(defmethod display-main1 ((application myapp1) stream)
    (draw-circle* stream 50 50 50
		  :start-angle *component-start-angle*
		  :end-angle *component-end-angle*
		  :ink +red+
		  :line-thickness 2))

(define-myapp1-command (com-myapp1-exit :name t :menu "EXIT") ()
  (clim:frame-exit clim:*application-frame*))

;; -------------------- Starthilfe --------------
;(defvar *clim-root* (clim:open-root-window :sheet)) 

(defvar *clim-root1* (clim:open-root-window :clx :host "goldfinger"))

(defun run ()
  (let ((tach (clim:make-application-frame 'MYAPP1 :parent *clim-root1*
					  :left 400 :right 800 :top 100 :bottom 600)))
       (process:process-run-function "task" #'clim:run-frame-top-level tach)))


0,,


Main Index | Thread Index