[pal-cvs] CVS pal/examples

tneste tneste at common-lisp.net
Wed Jul 18 21:29:56 UTC 2007


Update of /project/pal/cvsroot/pal/examples
In directory clnet:/tmp/cvs-serv26613/examples

Modified Files:
	hello.lisp polygons.lisp 
Log Message:
Added DRAW-CIRCLE

--- /project/pal/cvsroot/pal/examples/hello.lisp	2007/07/16 20:46:23	1.6
+++ /project/pal/cvsroot/pal/examples/hello.lisp	2007/07/18 21:29:55	1.7
@@ -4,6 +4,7 @@
 
 (defun hello-1 ()
   (pal:with-pal (:title "Hello!" :paths (merge-pathnames "examples/" pal::*pal-directory*))
+    (print (pal:get-gl-info))
     (let ((font (pal:load-font "georgia")))
       (loop for y from 0 to 300 by 2 do
            (pal:draw-line (pal:v 0 (* y 2)) (pal:v 800 (* y 2))
--- /project/pal/cvsroot/pal/examples/polygons.lisp	2007/07/18 19:27:22	1.4
+++ /project/pal/cvsroot/pal/examples/polygons.lisp	2007/07/18 21:29:56	1.5
@@ -64,10 +64,19 @@
       ;; For example, image of size 65x30 will be expanded to the size 128x32, so it is a
       ;; good idea to try and fit the image sizes inside the nearest power of two to save memory.
 
-      (with-blend (:color '(255 255 255 128))
-        (draw-rectangle (v+ (get-mouse-pos) (v 30 30))
-                        100 100
-                        255 255 255 64
+      ;; (draw-rectangle (v+ (get-mouse-pos) (v 30 30))
+      ;; 100 100
+      ;; 255 255 255 64
+      ;; :absolutep t
+      ;; :fill slad)
+
+      ;; Replaced with DRAW-CIRCLE, looks a lot nicer that way
+      ;; It works mostly the same as DRAW-RECTANGLE
+
+      (loop for r from 100 downto 50 by 2 do
+           (draw-circle (v+ (get-mouse-pos) (v 30 30))
+                        r
+                        255 255 255 10
                         :absolutep t
                         :fill slad))
 




More information about the Pal-cvs mailing list