Let's say, though, that we have a 10x128 image that we want to tile
into a 128x128 square. If we're using NSImage, we can do this with
NSImage to accomplish that:
//--------------------------------------------
// draw image data into a new NSImage, tiling a 10px-wide image
horizontally
What happens is that you're telling newImage to fill its entire rect
with an image smaller than the newImageRect dimensions, so NSImage
automatically tiles the drawn image.
Note: Untested code, written in e-mail, may contain typos or other
errors. But you get the idea.
--
Michael Watson
On 27 Jul, 2006, at 18:16, Alan Smith wrote:
It would help if I knew how to "tile" an NSImage. In your explanation
it seems that I just make an NSImage with a 1px wide image and I'm all
set. Well, I need the image to repeated over and over again in one
direction, creating a "bar." I can't figure out how to do this with
NSImage.
Thanks for being so patient, Alan
--
// Quotes from yours truly -------------------------
"You don't forget, you just don't remember."
"Maturity resides in the mind."
"Silence is the Universe's greatest gift."
"Don't waste your life doing things others have already done."
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/mikey-san%
40bungie.org
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden