• 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: NSView and array of moveable NSImages
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSView and array of moveable NSImages


  • Subject: Re: NSView and array of moveable NSImages
  • From: Michael Watson <email@hidden>
  • Date: Thu, 5 Apr 2007 16:13:20 -0400

Actually, your index-0 layer will be on the bottom. This ends up being more efficient when adding new image layers, especially if you add them near or at the top of the stack. When you perform your recompositing, you can just walk the array from 0 to N and things automagically draw in order. (Recompositing dirty rects only, of course.)

--
m-s


On 05 Apr, 2007, at 16:01, I. Savant wrote:

On 4/5/07, Scott Anguish <email@hidden> wrote:

There isn't much extensive to it. You simply start at the closest rectangle and test the bounds against the mouse location. First hit is the one that you drag.


So you're saying the z-order should be managed by the image's position in the array (index zero being the topmost image)? If so, that's even better than maintaining a "z-order" property. :-) Just move the images around in the array to change the z-order.

 (sigh) No matter how efficient you think you've made something,
someone always comes along and points out a way you can make it even
more so. :-}

--
I.S.
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
40bungie.org


This email sent to email@hidden

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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


References: 
 >NSView and array of moveable NSImages (From: "Fen Soares" <email@hidden>)
 >Re: NSView and array of moveable NSImages (From: Scott Anguish <email@hidden>)
 >Re: NSView and array of moveable NSImages (From: "I. Savant" <email@hidden>)

  • Prev by Date: Re: NSView and array of moveable NSImages
  • Next by Date: Re: NSView and array of moveable NSImages
  • Previous by thread: Re: NSView and array of moveable NSImages
  • Next by thread: multiple nibs
  • Index(es):
    • Date
    • Thread