• 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
Faster drawing sprite and background
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Faster drawing sprite and background


  • Subject: Faster drawing sprite and background
  • From: jean-michel daix <email@hidden>
  • Date: Mon, 08 Oct 2001 13:19:50 +0200

Hi,

I'm using a NSView based Cocoa application basicely drawing a background and
a sprite. My problem is "drawRect". My background is a 640x480 image and so
it can only be drawed about 12 time by second on my G4 400 (12 fps). I don't
want to redraw all my background all the time for sure, I just want to
redraw the sprite and a part of the background. But, tell me if I'm wrong,
"drawRect" is made to redraw all the content of the NSView.

I have try to add a NSImageVIew under my NSView for my background but when
calling [backgroundView setImage:myBackGroundImage] from my NSView it
doesn't work. (I'm using setImage because my Background is created by a part
of the application at the initialisation and is not always the same image)

Should I stop to use NSView to deal with my sprite and trying to use only
NSImageView or someone knows a better way to do that ?

Thanks for your help.


-----------------------------------
jean-michel daix / email@hidden
Sorry, I9m French !

visit <http://www.adforum.com>


  • Follow-Ups:
    • Re: Faster drawing sprite and background
      • From: rsharp <email@hidden>
    • Re: Faster drawing sprite and background
      • From: "John C. Randolph" <email@hidden>
  • Prev by Date: Build error: OmniFoundation: _OBASSERT
  • Next by Date: Re: Faster drawing sprite and background
  • Previous by thread: Re: Table View Data Source Question
  • Next by thread: Re: Faster drawing sprite and background
  • Index(es):
    • Date
    • Thread