
Update of /project/mcclim/cvsroot/mcclim/Extensions In directory clnet:/tmp/cvs-serv24182/Extensions Modified Files: rgb-image.lisp Log Message: Added an extension function SHEET-RGB-IMAGE, which "screenshots" a sheet into an RGB-IMAGE; basically the opposite of MEDIUM-DRAW-RGB-IMAGE. Implemented only for CLIM-CLX and only for true color visuals. * Backends/CLX/clim-extensions.lisp (ZIMAGE-TO-RGB): New helper function. (SHEET-RGB-DATA): New method. * Extensions/rgb-image.lisp (SHEET-RGB-IMAGE): New extension function. (SHEET-RGB-DATA): New backend protocol function. --- /project/mcclim/cvsroot/mcclim/Extensions/rgb-image.lisp 2007/01/07 19:32:29 1.1 +++ /project/mcclim/cvsroot/mcclim/Extensions/rgb-image.lisp 2007/04/01 17:24:04 1.2 @@ -67,3 +67,24 @@ (defmethod medium-draw-image-design* :before (medium design x y) (assert (eq medium (slot-value design 'medium)))) + + +;;; Fetching protocol + +(defun sheet-rgb-image (sheet &key x y width height) + (multiple-value-bind (data alphap) + (sheet-rgb-data (port sheet) + sheet + :x x + :y y + :width width + :height height) + (destructuring-bind (height width) + (array-dimensions data) + (make-instance 'rgb-image + :width width + :height height + :data data + :alphap alphap)))) + +(defgeneric sheet-rgb-data (port sheet &key x y width height))
participants (1)
-
dlichteblau