[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: color of a pixel
- To: Tom McDougal <mcdougal@gargoyle.uchicago.edu>
- Subject: Re: color of a pixel
- From: Bill St. Clair <bill>
- Date: Wed, 23 Jan 91 11:58:51 -0500
- Cc: info-macl@cambridge.apple.com
- In-reply-to: Your message of Tue, 22 Jan 91 14:45:58 -0600. <9101222045.AA08837@tartarus.uchicago.edu>
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)))))