• 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: Function to write to one pixel?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Function to write to one pixel?


  • Subject: Re: Function to write to one pixel?
  • From: Dustin Robert Kick <email@hidden>
  • Date: Fri, 6 May 2005 16:47:16 -0500

Thanks for explaining what NSMakePoint does, I actually had a suspicion that NSPoint was only a memory object, but now it is confirmed, but as for painting a single pixel, the particulars, whether "to the screen" or otherwise, a single pixel view object then, how would I make a single pixel "view object" what ever the difference is?


Dustin Kick

On May 6, 2005, at 3:30 AM, j o a r wrote:


On 6 maj 2005, at 08.56, Dustin Robert Kick wrote:


Shouldn't the code to paint a single pixel be the "NSPoint p1 = NSMakePoint(X(f),Y(f));" sections of code, which were the variations I tried, that didn't work. If not, what does NSMakePoint do?


It creates a NSPoint struct - it's in no way a drawing operation...


, and where do I find a function to paint a single pixel to the screen?


The Cocoa drawing model is centered around view objects. Drawing "to the screen" isn't really something that makes sense in Cocoa and Quartz. A NSView object is responsible for managing drawing inside it's frame, and that's done in the context of it's window.
In the sample code you quoted, drawing is performed by the NSRectFill, and strokeLineFromPoint: operations.


j o a r




_______________________________________________ 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: 
 >Function to write to one pixel? (From: Dustin Robert Kick <email@hidden>)
 >Re: Function to write to one pixel? (From: j o a r <email@hidden>)

  • Prev by Date: Re: NSTextView with RTF as string?
  • Next by Date: Re: Displaying HTML in an NSTextView
  • Previous by thread: Re: Function to write to one pixel?
  • Next by thread: Re: Function to write to one pixel?
  • Index(es):
    • Date
    • Thread