• 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 a single pixel
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Drawing a single pixel


  • Subject: Re: Drawing a single pixel
  • From: Vince DeMarco <email@hidden>
  • Date: Sat, 26 May 2001 20:24:58 -0700

On Saturday, May 26, 2001, at 08:06 PM, email@hidden wrote:

I wrote a mset fractal program a while back for Mac OS <9 in C. And I would like to write one in cocoa. Well, I was just wondering how to draw a single pixel. I guess I could use NSBezier and just make a rect that is 1 pixel large but I was wondering if there was a way to just do a single pixel.


You could create a NSImage with a NSBitmapImageRep (you can get at the bitmap data from BitmapImageRep) set the pixel you want then composite this back into your View when appropriate.

vince


  • Follow-Ups:
    • Re: Drawing a single pixel
      • From: "Dennis C. De Mars" <email@hidden>
References: 
 >Drawing a single pixel (From: email@hidden)

  • Prev by Date: Drawing a single pixel
  • Next by Date: Re: Drawing a single pixel
  • Previous by thread: Drawing a single pixel
  • Next by thread: Re: Drawing a single pixel
  • Index(es):
    • Date
    • Thread