diff --git a/ChangeLog b/ChangeLog index c4e32aca8..849c7fdea 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Wed Dec 22 12:04:00 1999 Richard Frith-Macdonald + + * Source/NSImage.m: When creating an off-screen cache, fill with + the background color (so having multiple caches for different + backgrounds will work). + Wed Dec 22 10:08:00 1999 Richard Frith-Macdonald * Source/NSWindow.m: ([-sendEvent:]) reset _lastDragView on exit from diff --git a/Source/NSImage.m b/Source/NSImage.m index 77a306217..52d9c5241 100644 --- a/Source/NSImage.m +++ b/Source/NSImage.m @@ -600,17 +600,17 @@ static Class cacheClass = 0; */ if (repd->bg == nil) { - NSRect bounds; + NSRect drawRect = NSMakeRect(0, 0, _size.width, _size.height); [self lockFocusOnRepresentation: rep]; - bounds = [_lockedView bounds]; if (_color != nil && [_color alphaComponent] != 0.0) { + NSRect bounds = [_lockedView bounds]; + [_color set]; - NSEraseRect(bounds); + NSRectFill(bounds); } - [self drawRepresentation: repd->original - inRect: NSMakeRect(0, 0, _size.width, _size.height)]; + [self drawRepresentation: repd->original inRect: drawRect]; [self unlockFocus]; if (_color == nil) {