[cl-gd-devel] Funky compile warnings with (with-thickness )
Rusty Shackleford
rs at natchie.mine.nu
Tue Feb 22 01:48:14 UTC 2005
I'm using (with-thickness (5) to draw some lines, and when I compile the
code (in emacs slime with C-c C-k) I get a bunch of messages that look
like:
; ==>
; (SB-ALIEN-INTERNALS:%SAP-ALIEN ALIEN
;
'#<SB-ALIEN-INTERNALS:ALIEN-RECORD-TYPE (STRUCT
;
CL-GD::GD-IMAGE
;
(CL-GD::PIXELS
;
#)
;
(CL-GD::SX
;
#)
;
(CL-GD::SY
;
#)
;
(CL-GD::COLORS-TOTAL
;
#)
;
(CL-GD::RED ..))>)
;
; note: unable to
; optimize
; because:
; could not optimize away %SAP-ALIEN: forced to do runtime
; allocation of alien-value structure
; compilation unit finished
What the heck does this mean? Here's the code that causes the pain:
; This section draws the map.
(require "cl-gd")
(cl-gd:with-image* (*pngwidth* *pngheight*)
(cl-gd:allocate-color 190 190 190)
(let ((red (cl-gd:allocate-color 163 83 84))
(green (cl-gd:allocate-color 104 156 84))
(yellow (cl-gd:allocate-color 236 236 236))
(black (cl-gd:allocate-color 0 0 0)))
;; Draw all towns.
(dolist (town *towns*)
(cl-gd:draw-filled-circle (mapdim (getf town :lat) *pngwidth*)
(mapdim (getf town :long) *pngheight*)
20 :color black)
;; Draw roads between neighboring towns.
(cl-gd:with-thickness (5)
(dolist (neighbor (getf town :neighbors))
(cl-gd:draw-line (mapdim (getf town :lat) *pngwidth*)
(mapdim (getf town :long) *pngheight*)
(mapdim (getf (town-lookup neighbor *towns*) :lat) *pngwidth*)
(mapdim (getf (town-lookup neighbor *towns*) :long) *pngheight*)
:color black))))
;; Draw start town as green circle.
(cl-gd:draw-filled-circle (mapdim (getf *start-town* :lat) *pngwidth*)
(mapdim (getf *start-town* :long) *pngheight*)
15 :color green)
;; Fill in evaluation function's choices.
(dolist (town *path*)
(cl-gd:draw-filled-circle (mapdim (getf town :lat) *pngwidth*)
(mapdim (getf town :long) *pngheight*)
15 :color yellow))
;; Draw goal town as red circle.
(cl-gd:draw-filled-circle (mapdim (getf *goal-town* :lat) *pngwidth*)
(mapdim (getf *goal-town* :long) *pngheight*)
15 :color red))
(cl-gd:write-image-to-file "/var/www/website/draw1.png" :compression-level 6 :if-exists :supersede))
Thanks for the help.
More information about the Cl-gd-devel
mailing list