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/
_______________________________________________
Bug-gnustep mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-gnustep