• 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: Drawing onto NSImageView subclass (Newbie)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Drawing onto NSImageView subclass (Newbie)


  • Subject: Re: Drawing onto NSImageView subclass (Newbie)
  • From: Andreas Mayer <email@hidden>
  • Date: Sun, 8 Feb 2004 22:05:31 +0100

Am 08.02.2004 um 20:01 schrieb Alan Cook:

Is it alright is I call my addPoint: method inside the drawRect:
method? Or am I just a total newbie.

You should try to distinguish between your model and the view.

The model holds the information what to draw and the view does the actual drawing.

So you would probably call addPoint: in mouseDown: to add the point to your model (an array for instance) and have the model read inside drawRect: to draw the points accordingly.


bye. Andreas.
_______________________________________________
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: Drawing onto NSImageView subclass (Newbie) (From: Alan Cook <email@hidden>)

  • Prev by Date: Re: Characters with accents in NSString
  • Next by Date: Re: MVC question
  • Previous by thread: Re: Drawing onto NSImageView subclass (Newbie)
  • Next by thread: Re: Drawing onto NSImageView subclass (Newbie)
  • Index(es):
    • Date
    • Thread