Re: NSView, scrolling colorWithPatternImage
Re: NSView, scrolling colorWithPatternImage
- Subject: Re: NSView, scrolling colorWithPatternImage
- From: glenn andreas <email@hidden>
- Date: Sun, 10 Apr 2005 11:31:33 -0500
On Apr 9, 2005, at 9:24 PM, Duncan Campbell wrote:
Hi folks.
I'm trying to create a custom toolbar at the top of a window using an
NSView that has it's size set it to stick to the top of the window
(and auto-resize sideways).
I'm filling it with a pattern using [NSColor colorWithPatternImage:
which is working correctly, however when I resize my window on the
vertical (i.e. up and down), then the pattern in the NSView seems to
scroll.
Is there any way I can "lock" the image or turn off this behavior?
regards,
It is locked - it's just that patterns are locked to the origin (which
is the bottom left by default) and so the pattern moves with the bottom
of the window (making it appear to be scrolling).
I don't remember if "isFlipped" resolves this, but you can always just
explicitly set where the pattern origin phase is (effectively scrolling
as far as the bottom left is concerned, but making it appear fixed for
the top left).
Glenn Andreas email@hidden
<http://www.gandreas.com/> oh my!
quadrium | build, mutate, evolve | images, textures, backgrounds, art
_______________________________________________
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