Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How do I pattern an image in a view w/o "scrolling"?



I'm using colorWithPatternImage to fill an NSView. It works fine
except I don't want it to scroll around. I want the image to be
"locked." This problem was encountered before by several people:

http://www.cocoabuilder.com/archive/message/cocoa/2005/3/15/130475
http://www.cocoabuilder.com/archive/message/cocoa/2005/4/10/132753

But neither seem to have an easy-to-use working solution. I tried the
setPatternPhase: of NSGraphicsContext technique but it didn't seem to
have any affect. The other technique doesn't seem like it should be
the only way to do it. It doesn't make a lot of sense. Also, you would
think Apple would have figured this out and added some way to fix it.

If there is some way to fill a NSView with a 1px wide image than using
NSColor to set the color and then use
NSRectFill/fillRect(NSBezierPath) I would love to know about it.

Thanks for any help, 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/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.