Re: Drawing noise in Cocoa (preferably fast)
Re: Drawing noise in Cocoa (preferably fast)
- Subject: Re: Drawing noise in Cocoa (preferably fast)
- From: Wim Lewis <email@hidden>
- Date: Tue, 14 Jun 2011 15:14:29 -0700
On 14 Jun 2011, at 2:56 PM, Stephen Blinkhorn wrote:
> I'm looking to fill a large custom view with noise. The solution I have arrived at so far is taking much too long to draw for it to be useable. Does anyone know any better ways of achieving this in Cocoa? The basic idea is to add an amount of noise to a base color pixel by pixel, for example:
For putting a rectangular grid of squares on the screen, if you know their color components and they're all in a single colorspace, it should be much faster to fill in a buffer of color values, create an image with CGImageCreate(), and blit that.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please 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