• 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
drawing pixels in NSView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

drawing pixels in NSView


  • Subject: drawing pixels in NSView
  • From: Carsten Koehler <email@hidden>
  • Date: Mon, 26 Nov 2001 19:47:55 +0100

Hi all,

I'm trying to create an application where I can draw 'big' pixels on a NSView. (Just like an Icon Editor)

What I'm doing is to get the mouse position, calculate a rectangle, append it to an NSBezierPath and redraw the NSView.

Basically it's working the only problem is, that it doesn't respond to my drawing quite well. If I move the mouse very slowly, it draws every dot. But if I move the mouse faster, the distance between the dots get bigger and bigger.

I tried to speed the application up and gave the NSView the first responder, repain the NSView in the rect that changed only , and still it's too slow.

Two questions:

Is there a possibility to make the NSView more responsive?

Is there a better way of painting an image with 'big' pixels? Maybe with a BitmapRep?

Any ideas? Or some source code sample?

Thanks for your help

Carsten


  • Follow-Ups:
    • Re: drawing pixels in NSView
      • From: Carlos Weber <email@hidden>
    • Re: drawing pixels in NSView
      • From: Tom Waters <email@hidden>
    • Re: drawing pixels in NSView
      • From: Guillaume Borios <email@hidden>
  • Prev by Date: NSScanner problem
  • Next by Date: Re: Documenting Obj-C code
  • Previous by thread: Re: NSScanner problem
  • Next by thread: Re: drawing pixels in NSView
  • Index(es):
    • Date
    • Thread