On 19/06/2009, at 6:14 PM, Chunk 1978 wrote:
i have this image ("image.png") that i would like to tile throughout the view... i've read the Quartz 2D programming guide... ok, ok, i breezed thru it, i admit... but i couldn't seem to find an easy way of repeating an image through out a view without actually drawing the image programatically...
It's actually a little complicated, you need to create an NSColor instance using a pattern image and then when you draw it you need to set the patternPhase of the current NSGraphicsContext so that your image is drawn in the correct place.
Have a look at Dave Batton's excellent DBBackgroundView: http://www.mere-mortal-software.com/blog/details.php?d=2007-01-16&c=show -- Rob Keniger _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com