Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > simple drawing

simple drawing
Thread Tools
Registered User
Join Date: Apr 2001
Status: Offline
Reply With Quote
May 18, 2001, 04:12 PM
 
OK fellaws...I'm trying to migrate to cocoa and being a novice programmer I can't figure out how to get an image and draw it to the screen. This was very easy with the classic os. You would store it in a resource and then use getPicture() to access this picture. I haven't had much time and will to read the lenghty documentation for cocoa so if anyone could help I would really appreciate it...thanx
     
Admin Emeritus
Join Date: Oct 2000
Location: Boston, MA
Status: Offline
Reply With Quote
May 18, 2001, 04:30 PM
 
You can just use an NSImageView if it suits your needs. I think the method for that is setImageNSImage *)

In order to load an NSImage from your resources, use the NSImage class method imageNamedNSString *)

If you want more control, try using NSImage's compositeToPoint: or drawAtPoint: methods while locking (lockFocus) an NSView.
"Against stupidity, the gods themselves contend in vain" (Schiller)
     
lenz  (op)
Registered User
Join Date: Apr 2001
Status: Offline
Reply With Quote
May 18, 2001, 04:38 PM
 
great! thanx
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 03:11 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2