Mailing Lists: Apple Mailing Lists

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

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



Alan:

This isn't something for Apple to "figure out" or "fix" - this is the expected, clearly-documented behavior for this function: "The image is tiled starting at the bottom of the window."

The first and only response to the very first thread you mentioned contained one good work-around if you do want to tile the image. This approach isn't as "easy" as just calling one method, but it's certainly not that difficult. :-) Off-screen drawing is very common and a good fit for this situation.

In other words, the method you're using is not broken -- it just needs to be adapted to your purpose.

--
I.S.


On Jul 27, 2006, at 4:11 PM, Alan Smith wrote:

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/idiotsavant2005% 40gmail.com


This email sent to 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: http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >How do I pattern an image in a view w/o "scrolling"? (From: "Alan Smith" <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.