• 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: creating a draw window
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: creating a draw window


  • Subject: Re: creating a draw window
  • From: John Pannell <email@hidden>
  • Date: Tue, 17 Jan 2006 21:09:49 -0700

Hi Robert-

If you are nibless, you'll need to instantiate an NSWindow object and then create a custom NSView subclass to put your drawing commands in. You'll need to add your view to the window's view hierarchy (perhaps via setContentView: on the window or addSubview: on the window's content view).

For Cocoa drawing, you'll want to look into NSBezierPath, or some of the drawing functions like NSRectFill. You will want to place these drawing commands in the drawRect: method of your custom view. Getting lower level, you can look into the Quartz/CoreGraphics API.

All mentioned classes, methods, and APIs are quite googlable - sorry I don't have more time for depth... HTH!

John

On Jan 17, 2006, at 8:52 PM, Robert Dell wrote:

Can anybody please explain to me how to create a draw window as compared to a window with text and buttons?
I need to draw lines, fill parts with colors, and set/test pixels in that window.


a small note, I hard code by hand instead of using a nib file if that means anything.

Robert

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40positivespinmedia.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
References: 
 >creating a draw window (From: Robert Dell <email@hidden>)

  • Prev by Date: drawing and setting pixels
  • Next by Date: Re: Bindings don't populate dialog fields?
  • Previous by thread: creating a draw window
  • Next by thread: Re: creating a draw window
  • Index(es):
    • Date
    • Thread