Re: Draw a single bitmap multiple times into an NSView?
Re: Draw a single bitmap multiple times into an NSView?
- Subject: Re: Draw a single bitmap multiple times into an NSView?
- From: Ricky Sharp <email@hidden>
- Date: Mon, 27 Mar 2006 17:48:40 -0600
On Mar 25, 2006, at 8:36 PM, patrick wrote:
I'm trying to figure out the most efficient method for drawing a
bitmap image multiple times into an NSView. For example, I'd like to
load in a bitmap image from disk, and draw it repeatedly to a grid. It
doesn't seem like copying NSImage objects and repeatedly add them into
the view is particularly optimal.
Not sure what you mean by adding NSImages object to the view.
You can always subclass NSView and when drawing, just load the image
once and draw many times. There's also NSColor's
colorWithPatternImage: which makes it easy to draw repeating tiles.
___________________________________________________________
Ricky A. Sharp mailto:email@hidden
Instant Interactive(tm) http://www.instantinteractive.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden