Re: Fill an NSView with a tile of NSImage
Re: Fill an NSView with a tile of NSImage
- Subject: Re: Fill an NSView with a tile of NSImage
- From: malcom <email@hidden>
- Date: Sat, 25 Feb 2006 14:34:49 +0100
On 2/25/06, malcom <email@hidden> wrote:
> Thanks it works perfectly (using + colorWithPatternImage).
> I would to make another related question.
> I need to fill an NSView with this pattern image. To do it I've
> subclassed an NSView using XCode, then I've created an istance of it
> in InterfaceBuilder.
> To do it I've used a class with a small amount of code.
> It's not so elegant, I think (or not?!).
> Is there another way to do it?
> Thank you again.
> malcom
>
> On 2/25/06, John C. Randolph <email@hidden> wrote:
> >
> > On Feb 24, 2006, at 4:13 PM, malcom wrote:
> >
> > > Hello,
> > > I've a problem with an NSView and NSImage.
> > > I would to fill an NSView using a small image by duplicating it
> > > n-times (tile?). I've tried using this code:
> >
> > You're doing too much work. See +colorWithPatternImage: in the
> > NSColor documentation. For finer control, see -patternPhase and -
> > setPatternPhase: in NSGraphicsContext.
> >
> > -jcr
> >
> >
> > John C. Randolph <email@hidden> (408) 914-0013
> > Roaming Cocoa Engineer,
> > Available for your projects at great Expense and Inconvenience.
> >
> >
> >
> >
>
>
> --
> www.malcom-mac.com
> mac/win software development
> email@hidden
>
--
www.malcom-mac.com
mac/win software development
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:
This email sent to email@hidden