• 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: Reworked Worm example [Re: Small animation]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reworked Worm example [Re: Small animation]


  • Subject: Re: Reworked Worm example [Re: Small animation]
  • From: Lorenzo <email@hidden>
  • Date: Thu, 22 Jan 2004 07:00:33 +0100

Thank you! Now I understand. I have to paint the NSImage directly in the
drawRect method. Never put it into a NSImageView and move that. OK.
You were so clear. I am going to dowload your sample.

Thank you so much.


Best Regards
--
Lorenzo
email: email@hidden

> From: Shawn Erickson <email@hidden>
> Date: Wed, 21 Jan 2004 20:32:32 -0800
> To: cocoa-dev Development <email@hidden>
> Cc: Douglas Davidson <email@hidden>, Lorenzo <email@hidden>
> Subject: Reworked Worm example [Re: Small animation]
>
>
> On Jan 21, 2004, at 12:02 PM, Douglas Davidson wrote:
>
>> On Jan 21, 2004, at 11:14 AM, Alexander Spohr wrote:
>>
>>> don't move the view around! draw what you want at the place you want
>>> inside your view. but do not move views around.
>>>
>>> the demo your'e looking for is called Worm. i found it some days ago,
>>> but forgot where it was.
>>
>> /Developer/Examples/AppKit/Worm.
>
> So for fun I added a new view class called BetterThenBetterWormView to
> Apple's stock Worm example that uses Panther's support of multiple
> invalid rectangles in a drawRect call. If you play with it while Quartz
> Debug is flashing update rectangles you can see the difference it
> makes. The BetterThenBetterWormView is used when you play the game or
> select "Bestest" (yeah yeah). You of course need 10.3+ to use this
> version.
>
> Update Example Source: http://homepage.mac.com/shawnce/misc/Worm.zip
>
> I did notice one funky thing while doing it... it looks like the
> NSView's needsToDrawRect: method is broken. I had to implement my own
> to get it to display correctly in all situations. If you knock out my
> implementation you can see what goes wrong. Is this a known defect? I
> sort of remember something about this a while back...
>
> -Shawn
_______________________________________________
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.

References: 
 >Reworked Worm example [Re: Small animation] (From: Shawn Erickson <email@hidden>)

  • Prev by Date: Re: Programmatically setting a radio button
  • Next by Date: Initialize Cocoa/ObjC from a dynamically-loaded bundle?
  • Previous by thread: Reworked Worm example [Re: Small animation]
  • Next by thread: Re: Reworked Worm example [Re: Small animation]
  • Index(es):
    • Date
    • Thread