NSCopyBits
NSCopyBits
- Subject: NSCopyBits
- From: Andrew Frezell <email@hidden>
- Date: Mon, 31 Mar 2003 14:46:19 -0500
Hello,
I'm working on writing a portability layer for Xlib and I'm trying to
implement the XCopyArea using NSCopyBits. The Display, Drawable, and
GC are #define'd away to int's and are currently ignored. The problem
I'm having is the NSCopyBits doesn't seem to do anything...I'm new to
Cocoa so I'm unsure how this is supposed to work and there is very
little documentation. Do I need to pass in the NSView and call
displayInRect on it, to get the repaint to occur or should it occur
immediately after calling NSCopyBits? I'm am doing the painting in an
OpenGL view, so could there be any issues with this? Any help or tips
on using NSCopyBits would really help. I would like the results to
paint immediately, so I think I need displayInRect as opposed to
setNeedsDisplayInRect.
static void XCopyArea(Display *d, Drawable src, Drawable dest, GC g,
int src_x, int src_y, unsigned int width, unsigned int height,
int dest_x, int dest_y) {
NSRect src = NSMakeRect(src_x, src_y, width, height);
NSPoint dest;
dest.x = dest_x;
dest.y = dest_y;
NSCopyBits(nil, src, dest);
}
---
Andrew Frezell
Software Engineer
AirDefense, Inc. <
http://www.airdefense.net>
(770) 663-8115 x116
_______________________________________________
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.