Hi,
I hacked with-output-to-pixmap so :width and :height need not be given. I'm generally confused about various aspects of [Mc]CLIM, but the following code (adapted from Franz's CLIM manual) was observed to paint a something at mouse click position, so it might just work. Patch is attached.
(define-test-command (test-pixmaps :menu t) () (let* ((stream (get-frame-pane *application-frame* 'display)) (medium (clim:sheet-medium stream))) (let ((pixmap (clim:with-output-to-pixmap (mv stream) (with-drawing-options (mv :ink +red+) (clim:draw-circle* mv 50 50 20 :filled t) (clim:draw-rectangle* mv 0 0 90 90 :filled nil))))) (multiple-value-bind (x y) (block get-position (clim:tracking-pointer (stream) (:pointer-button-press (x y) (return-from get-position (values x y))))) (clim:copy-from-pixmap pixmap 0 0 (clim:pixmap-width pixmap) (clim:pixmap-height pixmap) medium x y)))))
Cheers,
Rudi