|
From: | julian |
Subject: | [bug #34467] -[NSView bitmapImageRepForCachingDisplayInRect:] broken |
Date: | Mon, 03 Oct 2011 18:18:25 +0000 |
User-agent: | Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/534.50 (KHTML, like Gecko) Version/5.1 Safari/534.50 |
URL: <http://savannah.gnu.org/bugs/?34467> Summary: -[NSView bitmapImageRepForCachingDisplayInRect:] broken Project: GNUstep Submitted by: julian_ Submitted on: Mo 03 Okt 2011 18:18:24 GMT Category: None Severity: 3 - Normal Item Group: None Status: None Privacy: Public Assigned to: None Open/Closed: Open Discussion Lock: Any _______________________________________________________ Details: i am trying to use the following category (works on Mac OS X) to capture the contents of an NSView including subviews as an NSImage but it doesn't work as there is an exception somewhere deep in bitmapImageRepForCachingDisplayInRect: @implementation NSView (NSView_Snapshot) - (NSImage *)snapshotIncludingSubviews { NSBitmapImageRep *imageRep = [self bitmapImageRepForCachingDisplayInRect:self.bounds]; NSImage *renderedImage = [[NSImage alloc] initWithSize:[imageRep size]]; [self cacheDisplayInRect:self.bounds toBitmapImageRep:imageRep]; [renderedImage addRepresentation:imageRep]; return [renderedImage autorelease]; } @end minimal runnable sample project to illustrate the issue attached issue occurs in SVN trunk as of today as well as a few months ago. _______________________________________________________ File Attachments: ------------------------------------------------------- Date: Mo 03 Okt 2011 18:18:24 GMT Name: GNUstepTest.tar.gz Size: 2kB By: julian_ <http://savannah.gnu.org/bugs/download.php?file_id=24089> _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?34467> _______________________________________________ Nachricht geschickt von/durch Savannah http://savannah.gnu.org/
[Prev in Thread] | Current Thread | [Next in Thread] |