• 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
NSScreen and NSCoptBits
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: Threads, messages and blocking
  • Next by Date: Re: Threads, messages and blocking
  • Previous by thread: Re: Threads, messages and blocking
  • Next by thread: color
  • Index(es):
    • Date
    • Thread