• 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: NSImage drawing woes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSImage drawing woes


  • Subject: Re: NSImage drawing woes
  • From: "M. Uli Kusterer" <email@hidden>
  • Date: Sun, 4 Jan 2004 13:29:26 +0100

At 0:18 Uhr -0800 04.01.2004, cocoa dev wrote:
Is there a better way to do this? If not, you seemed to imply that I could draw into an NSWindow using drawAtPoint...I'm sorry if this is very basic for you, but I'm having trouble conceptually...Is there a "view" that I can composite to as and where I choose?
Again, many thanks for your assistance and patience

Sure. Just create an NSView subclass. However, don't draw into it like you're doing now, but rather, implement its drawRect: method and draw from there. (if you choose "New File" in xCode, there is a template for NSView subclasses with empty functions for the most important parts already in place)

You should have numerous sample applications on your hard disk that came with the developer tools which nicely demonstrate how to implement a custom view of your own. The docs on this particular aspect of Cocoa are also not too shabby.
--
Cheers,
M. Uli Kusterer
------------------------------------------------------------
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
References: 
 >Re: NSImage drawing woes (From: "cocoa dev" <email@hidden>)

  • Prev by Date: Re: Installing multiple hotkeys in app
  • Next by Date: re: any way to determine the encoding type of an NSData object?
  • Previous by thread: Re: NSImage drawing woes
  • Next by thread: any way to determine the encoding type of an NSData object?
  • Index(es):
    • Date
    • Thread