FROM : glenn andreas
DATE : Sun Apr 10 18:31:33 2005
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_removed>
<http://www.gandreas.com/> oh my!
quadrium | build, mutate, evolve | images, textures, backgrounds, art
DATE : Sun Apr 10 18:31:33 2005
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_removed>
<http://www.gandreas.com/> oh my!
quadrium | build, mutate, evolve | images, textures, backgrounds, art
| Related mails | Author | Date |
|---|---|---|
| Duncan Campbell | Apr 10, 04:24 | |
| glenn andreas | Apr 10, 18:31 | |
| Serge Meynard | Apr 10, 19:48 | |
| Matt Neuburg | Apr 10, 20:46 |






Cocoa mail archive

