• 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: Drawing faster with NSImage???
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Drawing faster with NSImage???


  • Subject: Re: Drawing faster with NSImage???
  • From: Nat! <email@hidden>
  • Date: Mon, 17 Dec 2001 21:40:38 +0100

On Montag, Dezember 17, 2001, at 08:41 Uhr, Joshua D. Orr wrote:

> I have a app that does a lot of drawing. I have been thinking if
> I draw to
> an NSImage and then when they scroll around, the just scroll around the
> NSImage. When they change something I could recalculate the
> NSImage. I am
> trying to find the best way to do this, does anyone have any
> suggestions?

You could make your drawing code a subclass of NSImageRep (not
NSBitmapImageRep I suppose) and do your drawing there. The NSImage
that owns that imageRep will automatically cache the drawing for
you. You may need to recache the NSImage (throw away the cache),
when something changed.

Cheers
Nat!
-----------------------------------------------------
Some people drink deep from the fountains of life, and
some just gargle. -- DLR


  • Follow-Ups:
    • Re: Drawing faster with NSImage???
      • From: Joshua Orr <email@hidden>
References: 
 >Drawing faster with NSImage??? (From: "Joshua D. Orr" <email@hidden>)

  • Prev by Date: Re: Cocoa Documentation on NSFormatter
  • Next by Date: Extraction of Information from Apple System Profiler
  • Previous by thread: Drawing faster with NSImage???
  • Next by thread: Re: Drawing faster with NSImage???
  • Index(es):
    • Date
    • Thread