[pal-cvs] CVS pal-gui

tneste tneste at common-lisp.net
Thu Oct 25 14:10:16 UTC 2007


Update of /project/pal/cvsroot/pal-gui
In directory clnet:/tmp/cvs-serv23076

Added Files:
	present.lisp 
Log Message:
Added present.lisp


--- /project/pal/cvsroot/pal-gui/present.lisp	2007/10/25 14:10:16	NONE
+++ /project/pal/cvsroot/pal-gui/present.lisp	2007/10/25 14:10:16	1.1
(in-package :pal-gui)


(defgeneric present (object gob width height))

(defmethod present :around (object (g widget) width height)
  (let ((ap (absolute-pos-of g)))
    (with-clipping ((1+ (vx ap)) (1+ (vy ap)) (- (width-of g) 2) (- (height-of g) 2))
      (call-next-method))))

(defmethod present (object (g widget) width height)
  (with-blend (:color *text-color*)
    (draw-text (format nil "~a" object) (get-text-offset))))



More information about the Pal-cvs mailing list