• 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
Getting pixel color from NSView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Getting pixel color from NSView


  • Subject: Getting pixel color from NSView
  • From: Ashley Perrien <email@hidden>
  • Date: Sun, 25 Jan 2009 13:06:07 -0600

Is there a way to get the color of a pixel or area of an NSView during the drawRect method? I'll be tiling the view with a grid of random colors but each tile is based on the colors around it. I'd prefer to call something along the lines of:

NSColor *aColor = [myView colorAtPoint: somePoint];

Rather than creating and filling a potentially quite large array of colors.

-Ashley
_______________________________________________

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: Getting pixel color from NSView
      • From: "John C. Randolph" <email@hidden>
    • Re: Getting pixel color from NSView
      • From: Andrew Farmer <email@hidden>
    • Re: Getting pixel color from NSView
      • From: Volker in Lists <email@hidden>
  • Prev by Date: Dates of the Chinese New Year
  • Next by Date: CFHTTP +authentication
  • Previous by thread: Re: Dates of the Chinese New Year
  • Next by thread: Re: Getting pixel color from NSView
  • Index(es):
    • Date
    • Thread