mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-29 19:07:38 +00:00
Merge from 0.8.0
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@14232 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
ecd458c9cd
commit
f51c1bbf10
14 changed files with 267 additions and 91 deletions
|
@ -879,17 +879,28 @@ repd_for_rep(NSArray *_reps, NSImageRep *rep)
|
|||
if (NSImageDoesCaching == YES)
|
||||
{
|
||||
NSWindow *window;
|
||||
GSRepData *repd;
|
||||
|
||||
if (imageRep == nil)
|
||||
imageRep = [self bestRepresentationForDevice: nil];
|
||||
|
||||
imageRep = [self _cacheForRep: imageRep];
|
||||
repd = repd_for_rep(_reps, imageRep);
|
||||
|
||||
window = [(NSCachedImageRep *)imageRep window];
|
||||
_lockedView = [window contentView];
|
||||
if (_lockedView == nil)
|
||||
[NSException raise: NSImageCacheException
|
||||
format: @"Cannot lock focus on nil rep"];
|
||||
[_lockedView lockFocus];
|
||||
|
||||
/* Validate cached image */
|
||||
if (repd->bg == nil)
|
||||
{
|
||||
repd->bg = [_color copy];
|
||||
[_color set];
|
||||
NSRectFill(NSMakeRect(0, 0, _size.width, _size.height));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue