mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-01 17:12:24 +00:00
* Source/NSImage.m (-guiDrawInRect:...): Handle dstRect with a zero size
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33303 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
b31f48569c
commit
f77fd386f4
2 changed files with 12 additions and 1 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
2011-06-14 Eric Wasylishen <ewasylishen@gmail.com>
|
||||||
|
|
||||||
|
* Source/NSImage.m (-guiDrawInRect:...): Handle dstRect with a zero size
|
||||||
|
|
||||||
2011-06-14 Eric Wasylishen <ewasylishen@gmail.com>
|
2011-06-14 Eric Wasylishen <ewasylishen@gmail.com>
|
||||||
|
|
||||||
* Source/NSImage.m: Remove unnecessary DPSgsave/DPSgrestore I added
|
* Source/NSImage.m: Remove unnecessary DPSgsave/DPSgrestore I added
|
||||||
|
|
|
@ -1086,7 +1086,14 @@ Fallback for backends other than Cairo. */
|
||||||
s = [self size];
|
s = [self size];
|
||||||
|
|
||||||
if (NSEqualRects(srcRect, NSZeroRect))
|
if (NSEqualRects(srcRect, NSZeroRect))
|
||||||
srcRect = NSMakeRect(0, 0, s.width, s.height);
|
{
|
||||||
|
srcRect.size = s;
|
||||||
|
/* For -drawAtPoint:fromRect:operation:fraction: used with a zero rect */
|
||||||
|
if (NSEqualSizes(dstRect.size, NSZeroSize))
|
||||||
|
{
|
||||||
|
dstRect.size = s;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!dstRect.size.width || !dstRect.size.height
|
if (!dstRect.size.width || !dstRect.size.height
|
||||||
|| !srcRect.size.width || !srcRect.size.height)
|
|| !srcRect.size.width || !srcRect.size.height)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue