Re: Repeating images for use as a background?
Re: Repeating images for use as a background?
- Subject: Re: Repeating images for use as a background?
- From: Marco Scheurer <email@hidden>
- Date: Tue, 13 Aug 2002 15:12:30 +0200
On Tuesday, August 13, 2002, at 02:57 pm, Jan Van Boghout wrote:
I am looking for a way to use a small image (say 16x16 pixels) to make
a background in an image view.
Does anybody know how to tile an image so that this can happen?
Basically I want to do something similar to what Apple does with the
images in Extras.rsrc
All help very much appreciated,
You can use a custom view and something like this:
- (void) drawRect:(NSRect) aRect
{
[[NSColor colorWithPatternImage:[NSImage imageNamed:@"tile"]] set];
NSRectFill (aRect);
}
Yes, images can be used as colors.
Marco Scheurer
Sen:te, Lausanne, Switzerland
http://www.sente.ch
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.