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

Re: color of a pixel

   Date: Tue, 22 Jan 91 14:45:58 CST
   From: Tom McDougal <mcdougal@gargoyle.uchicago.edu>
   To: info-macl@cambridge.apple.com
   Subject: color of a pixel
   Is there an equivalent of GetPixel that will tell me what color
   the pixel is?
   Sorry if this is a FAQ.
Try the following (you may want to translate it into an obfun):

(defun get-color-pixel (window h &optional v)
  (let ((point (make-point h v)))
    (rlet ((rgb :RGBColor))
      (with-focused-view window
        (_GetCPixel :long point :ptr rgb)
        (rgb-to-color rgb)))))