mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-02 10:21:00 +00:00
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:
parent
bd1466c314
commit
83c47a9e6f
2 changed files with 79 additions and 70 deletions
|
@ -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>
|
2008-11-16 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
* Source/NSView.m (-setBounds:, -setBoundsSize:): Fixed bug in
|
* Source/NSView.m (-setBounds:, -setBoundsSize:): Fixed bug in
|
||||||
|
|
|
@ -1201,6 +1201,8 @@ repd_for_rep(NSArray *_reps, NSImageRep *rep)
|
||||||
|
|
||||||
- (void) lockFocusOnRepresentation: (NSImageRep *)imageRep
|
- (void) lockFocusOnRepresentation: (NSImageRep *)imageRep
|
||||||
{
|
{
|
||||||
|
// FIXME: THis should rather use
|
||||||
|
// [NSGraphicsContext graphicsContextWithBitmapImageRep:]
|
||||||
if (_cacheMode != NSImageCacheNever)
|
if (_cacheMode != NSImageCacheNever)
|
||||||
{
|
{
|
||||||
NSWindow *window;
|
NSWindow *window;
|
||||||
|
@ -1391,7 +1393,9 @@ repd_for_rep(NSArray *_reps, NSImageRep *rep)
|
||||||
if ([GSCurrentContext() isDrawingToScreen] == YES)
|
if ([GSCurrentContext() isDrawingToScreen] == YES)
|
||||||
{
|
{
|
||||||
// Take the device description from the current context.
|
// Take the device description from the current context.
|
||||||
deviceDescription = [GSCurrentContext() attributes];
|
deviceDescription = [[[GSCurrentContext() attributes] objectForKey:
|
||||||
|
NSGraphicsContextDestinationAttributeName]
|
||||||
|
deviceDescription];
|
||||||
}
|
}
|
||||||
else if ([NSPrintOperation currentOperation])
|
else if ([NSPrintOperation currentOperation])
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue