[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Grabbing rectangle of pixels from PICT in window, using


I just put up a file called "screen-manager.lisp" to
apple.cambridge.com into the MCL2 contribs folder. It's some old code
but I think it does excately what you asked for. Here are two snippets:

(defun GET-SCREEN-RECTANGLE-REGION-FROM-USER (&optional Width Height) "
  in:  &optional Width Height {fixnum}.
  out: X Y Width Height {fixnum}.
  Return the position and size of a rectangle region on the screen."

(defun COPY-SCREEN-TO-ICON (X Y Icon &key Width Height) "
  in:  X Y {fixnum}, Icon {CIconHandle or PixmapHandle},
       &key Width Height {fixnum}.
  out: Icon {CIconHandle or PixmapHandle}.
  Copy the screen content at position <X>, <Y> into <Icon>.
  If <Width> <Height> are provided then scale screen content to icon
  Only copy to icon Pixmap, i.e., leave bitmap and mask untouched."