Re: Function to write to one pixel?
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
- Resent-cc: Dustin Robert Kick <email@hidden>, Cocoa-Developers List <email@hidden>
- Resent-date: Fri, 6 May 2005 16:58:19 -0500
- Resent-from: Dustin Robert Kick <email@hidden>
- Resent-message-id: <email@hidden>
- Resent-to: j o a r <email@hidden>
OK, wait, I think I have an idea of what a "view object" is. A "view
object" is painted onto a frame, rather than directly to the screen,
so that you don't have to write code to move your graphics around,
it's already handled in the "view object" code, so that you just move
the frame, and your "view object" moves in the frame, right? Still
want to know how to paint single pixels/pixel "view objects" onto the
frames. Does Cocoa handle entire screen view objects, so that you
can take over the entire screen for games, VR worlds, or other such
immersion programming?
Thanks for your help.
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