• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How do I pattern an image in a view w/o "scrolling"?
[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"?


  • Subject: Re: How do I pattern an image in a view w/o "scrolling"?
  • From: "I. Savant" <email@hidden>
  • Date: Thu, 27 Jul 2006 16:22:14 -0400

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

  • Prev by Date: Re: Checkbox in NSOutlineView. Must move mouse > 3 pixels to toggle
  • Next by Date: Re: Displaying an image with floating point samples
  • Previous by thread: How do I pattern an image in a view w/o "scrolling"?
  • Next by thread: Re: How do I pattern an image in a view w/o "scrolling"?
  • Index(es):
    • Date
    • Thread