NSScreen and NSCoptBits
NSScreen and NSCoptBits
- Subject: NSScreen and NSCoptBits
- From: David Blanton <email@hidden>
- Date: Thu, 29 May 2003 14:37:03 -0600
I am trying to copy screen contents to a view in my window.
I have :
IBOutlet NSView * myView;
NSPoint aPoint;
NSArray *theScreens = [NSArray arrayWithArray:[NSScreen screens]];
NSScreen * screenToCopy = [theScreens objectAtIndex:0];
NSRect screenToCopyFrame= [screenToCopy frame];
If( [myView canDraw] )
{
[myView lockFocus];
aPoint.x = aPoint.y = 0;
NSCopyBits(NULL, screenToCopyFrame, aPoint);
[myView unlockFocus];
}
I get no results. Does this code seem reasonable? Any help, please.
I understand [NSScreen frame] to return the location and size of the screen
as an NSRect which is the second parameter to NSCopyBits.
--
David Blanton
"Cocoa FNG"
_______________________________________________
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.