-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpictures-lab.lisp
53 lines (37 loc) · 1.3 KB
/
pictures-lab.lisp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
;; (ql:quickload :pictures)
;;(in-package :cluei)
(in-package :pictures)
;; class: WM-SHELL
;; class: TOP-LEVEL-SHELL
;; (dolist (class (class-name-precedence-list class-name) 0)
;; (let ((init-mask (getf (rest (assoc :event-mask (clue-resources class))) :initform)))
;; (when init-mask
;; (return init-mask))))
;; (class-name-precedence-list 'TOP-LEVEL-SHELL)
(defparameter *rectangle* (make-filled-rectangle 20 40 35 55))
(defparameter *line* (make-line 30 30 70 30))
(defparameter *polygon* (make-polygon '(10 10 50 10 50 30 25 50 10 30)))
(defparameter *view* nil)
(defun run-describe ()
(describe *polygon*))
(defun show-graphic ()
(PROGN
(SETF clue:*default-host* "freyr")
(setf *view* (make-view :parent
(make-contact
'top-level-shell
:parent (clue:open-contact-display 'hello-world)
:state :mapped
:wm-title "View"
:x 300
:y 300
:width 400
:height 400)
:width 400
:height 400))
(SETF (contact-background *view*) (screen-white-pixel
(contact-screen *view*)))
(process-next-event (contact-display *view*))
(SETF (display-after-function (contact-display *view*)) #'display-force-output)
(draw-graphic *rectangle* *view*)
(draw-graphic *polygon* *view*)))