• 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: RgnHandle replacement?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: RgnHandle replacement?


  • Subject: Re: RgnHandle replacement?
  • From: Jonathan Wight <email@hidden>
  • Date: Thu, 07 Nov 2002 00:57:31 -0600

On 11/07/2002 00:49, "Scott Anguish" <email@hidden> wrote:

>
> On Thursday, November 7, 2002, at 12:49 AM, Jonathan Wight wrote:
>> Maybe I didn't describe the problem well enough. I've already got code
>> to
>> hit test individual pixels within my icons (I'm using NSReadPixel on
>> the
>> icon's image instead of using pointer math), but now I want to find
>> out what
>> icons are selected when the users drags a selection marquee around
>> zero or
>> more icons.
>
> Ah.. ok.. sorry..
>
> Hrmm... you can tell the icons involved, by the bounds as you say...
>
> So, you'd want to test each of the icon areas that overlap the bounds
> of the selection to see if there is any pixels activated..
>
> Any pixel within that area is going to indicate a selection right?
>
> So, draw that intersected area of the icon into an NSImage that is 1x1
> (scale it) and then see if that single pixel is on.. you'd want to make
> sure that anti-aliasing is off when you do this..

Hmm. That might work well I think. Cool!

Just wish there was a NSRegion class though so I wouldn't have to worry
about this stuff. NSBezierPath doesn't cut the mustard sometimes.

Cheers!

Jon.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: RgnHandle replacement?
      • From: Scott Anguish <email@hidden>
    • Re: RgnHandle replacement?
      • From: Scott Anguish <email@hidden>
References: 
 >Re: RgnHandle replacement? (From: Scott Anguish <email@hidden>)

  • Prev by Date: Re: RgnHandle replacement?
  • Next by Date: Re: RgnHandle replacement?
  • Previous by thread: Re: RgnHandle replacement?
  • Next by thread: Re: RgnHandle replacement?
  • Index(es):
    • Date
    • Thread