mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 20:01:11 +00:00
* Source/NSImageRep.m (-guiDrawInRect:...fraction:): Readd special
handling for printing as suggested by Eric Wasylishen <ewasylishen@gmail.com>. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@36847 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
da2351d2b2
commit
a5412c1f42
2 changed files with 36 additions and 6 deletions
18
ChangeLog
18
ChangeLog
|
@ -1,14 +1,20 @@
|
|||
2013-07-07 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSImageRep.m (-guiDrawInRect:...fraction:): Readd special
|
||||
handling for printing as suggested by Eric Wasylishen
|
||||
<ewasylishen@gmail.com>.
|
||||
|
||||
2013-07-04 Quentin Mathe <quentin.mathe@gmail.com>
|
||||
|
||||
* Headers/Additions/GNUstepGUI/GSTheme.h:
|
||||
* Source/GSTheme.m:
|
||||
* Source/GSTheme.m:
|
||||
Added new theme image constant image names.
|
||||
* Source/NSImage.m (+imageNamed:, +_reloadCachedImages,
|
||||
+_pathForImageNamed:): Added support for providing custom theme control
|
||||
images in the same way that we support it for tiles. We now support a
|
||||
GSThemeImages section in the theme Info.plist for all the images stored
|
||||
* Source/NSImage.m (+imageNamed:, +_reloadCachedImages,
|
||||
+_pathForImageNamed:): Added support for providing custom theme control
|
||||
images in the same way that we support it for tiles. We now support a
|
||||
GSThemeImages section in the theme Info.plist for all the images stored
|
||||
inside a ThemeImages directory of the theme bundle.
|
||||
|
||||
|
||||
2013-07-04 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* config.make.in: Fix error in order of link/include directories
|
||||
|
|
|
@ -654,6 +654,30 @@ Fallback for backends other than Cairo. */
|
|||
|
||||
repSize = [self size];
|
||||
|
||||
if (![ctxt isDrawingToScreen])
|
||||
{
|
||||
/* We can't composite or dissolve if we aren't drawing to a screen,
|
||||
so we'll just draw the right part of the image in the right
|
||||
place. This code will only get used by the GSStreamContext. */
|
||||
NSPoint p;
|
||||
double fx, fy;
|
||||
|
||||
fx = dstRect.size.width / srcRect.size.width;
|
||||
fy = dstRect.size.height / srcRect.size.height;
|
||||
|
||||
p.x = dstRect.origin.x / fx - srcRect.origin.x;
|
||||
p.y = dstRect.origin.y / fy - srcRect.origin.y;
|
||||
|
||||
DPSgsave(ctxt);
|
||||
DPSrectclip(ctxt, dstRect.origin.x, dstRect.origin.y,
|
||||
dstRect.size.width, dstRect.size.height);
|
||||
DPSscale(ctxt, fx, fy);
|
||||
[self drawInRect: NSMakeRect(p.x, p.y, repSize.width, repSize.height)];
|
||||
DPSgrestore(ctxt);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/* Figure out what the effective transform from rep space to
|
||||
'window space' is. */
|
||||
transform = [ctxt GSCurrentCTM];
|
||||
|
|
Loading…
Reference in a new issue