Get the device description for an NSImage representation from the window.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27074 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
fredkiefer 2008-11-16 23:21:58 +00:00
parent bd1466c314
commit 83c47a9e6f
2 changed files with 79 additions and 70 deletions

View file

@ -1,3 +1,8 @@
2008-11-17 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSImage.m (-bestRepresentationForDevice:): Get the device
desription from the window.
2008-11-16 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSView.m (-setBounds:, -setBoundsSize:): Fixed bug in

View file

@ -1201,6 +1201,8 @@ repd_for_rep(NSArray *_reps, NSImageRep *rep)
- (void) lockFocusOnRepresentation: (NSImageRep *)imageRep
{
// FIXME: THis should rather use
// [NSGraphicsContext graphicsContextWithBitmapImageRep:]
if (_cacheMode != NSImageCacheNever)
{
NSWindow *window;
@ -1391,7 +1393,9 @@ repd_for_rep(NSArray *_reps, NSImageRep *rep)
if ([GSCurrentContext() isDrawingToScreen] == YES)
{
// Take the device description from the current context.
deviceDescription = [GSCurrentContext() attributes];
deviceDescription = [[[GSCurrentContext() attributes] objectForKey:
NSGraphicsContextDestinationAttributeName]
deviceDescription];
}
else if ([NSPrintOperation currentOperation])
{