Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
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"?




:-) That's a pretty broad question. It works just like drawing *on-screen*, but you create your "canvas" in code, draw to it, then do something with the drawn result.


Start here:
http://developer.apple.com/documentation/Cocoa/Conceptual/ CocoaDrawingGuide/index.html


If you need to draw something to an NSImage off-screen, just create your image at the correct size, then -lockFocus on it, do the drawing, -unlockFocus, and you've got a nicely-formed image to do with whatever you want (composite it to an on-screen view, or set it as a button's image, etc.).

  Hope this helps.

--
I.S.


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

Okay.

So, I've never done any "off screen drawing" before and I need some
help with this. To put it bluntly, how do I do it? Or, where do I
start?

Thanks, 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: This email sent to email@hidden
References: 
 >How do I pattern an image in a view w/o "scrolling"? (From: "Alan Smith" <email@hidden>)
 >Re: How do I pattern an image in a view w/o "scrolling"? (From: "I. Savant" <email@hidden>)
 >Re: 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 © 2011 Apple Inc. All rights reserved.