• 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: Screenshot code for Tiger
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Screenshot code for Tiger


  • Subject: Re: Screenshot code for Tiger
  • From: Uli Kusterer <email@hidden>
  • Date: Thu, 27 Apr 2006 11:46:43 +0200

Am 26.04.2006 um 05:35 schrieb Shawn Erickson:
On Apr 24, 2006, at 6:57 AM, Scott Thompson wrote:

On Apr 24, 2006, at 6:11 AM, Dmitry Savenok wrote:

In my app I use code similar to

NSView *view = [window contentView];
[view lockFocus];
NSBitmapImageRep *bitmap = [[NSBitmapImageRep alloc] initWithFocusedViewRect:[view bounds]];
[view unlockFocus];
and it works fine on all tested systems (10.2.3, 10.2.8, 10.3.5, 10.3.9,
10.4, 10.4.4(Intel), 10.4.5, 10.4.6).

For the sake of completeness, you can also look at the Carbon sample:

/Developer/Examples/Carbon/Magnify/

Or the source code for OSXvnc on source forge. Both of these use QuickDraw to capture portions of the screen.

Note QuickDraw is considered deprecated now so I would shy away from using any method that makes use of QuickDraw.

Anyone know if any of these screenshot methods includes the cursor? I tested the CG method, but while you can use it to create a live- updating NSImage containing a screenshot, with sort of "optical recursion", the cursor is not in the picture.


Cheers,
-- M. Uli Kusterer
http://www.zathras.de


_______________________________________________ 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: 
 >Screenshot code for Tiger (From: Nir Soffer <email@hidden>)
 >Re: Screenshot code for Tiger (From: "Dmitry Savenok" <email@hidden>)
 >Re: Screenshot code for Tiger (From: Scott Thompson <email@hidden>)
 >Re: Screenshot code for Tiger (From: Shawn Erickson <email@hidden>)

  • Prev by Date: Re: FYI: Cocoa's framework scaling works great!
  • Next by Date: Re: Calling `update_prebinding' programmatically
  • Previous by thread: Re: Screenshot code for Tiger
  • Next by thread: Re: Weird bug with selection in Textview with custom textcontainer [solved]
  • Index(es):
    • Date
    • Thread