• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSReadPixel
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSReadPixel


  • Subject: Re: NSReadPixel
  • From: Kyle Sluder <email@hidden>
  • Date: Mon, 13 Feb 2012 09:21:09 -0800

On Feb 13, 2012, at 8:48 AM, koko <email@hidden> wrote:

> Hello Kyle -
>
> What I am trying to accomplish is my own 'eye-droper' color picker (for reasons I cannot get into).
>
> Can you point me to the best method as I have done things other than a plain read pixel to no avail.

Well, as long as you're not using NSReadPixel to try to take a screenshot. ;-)

This page on CocoaDev suggests using a transparent window: http://www.cocoadev.com/index.pl?GettingTheColorUnderTheCursor

But I don't think a screen-sized window is necessary. You might be able to create a transparent 1px-by-1px window that follows the cursor hotspot, then lock focus on its contentView and call NSReadPixel.

--Kyle Sluder
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: NSReadPixel
      • From: Seth Willits <email@hidden>
References: 
 >Re: NSReadPixel (From: Kyle Sluder <email@hidden>)
 >Re: NSReadPixel (From: koko <email@hidden>)

  • Prev by Date: Odd display of percent character
  • Next by Date: Re: copy & isEqual nightmares
  • Previous by thread: Re: NSReadPixel
  • Next by thread: Re: NSReadPixel
  • Index(es):
    • Date
    • Thread