mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 13:30:37 +00:00
wraster library support and alpha/compositing improvements.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@6272 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
865001dd03
commit
327673731a
5 changed files with 22 additions and 44 deletions
|
@ -41,8 +41,6 @@
|
|||
#include <AppKit/NSWindow.h>
|
||||
#include <AppKit/PSOperators.h>
|
||||
|
||||
static BOOL NSImageCompositing = YES;
|
||||
|
||||
@interface GSCacheW : NSWindow
|
||||
@end
|
||||
|
||||
|
@ -73,14 +71,6 @@ static BOOL NSImageCompositing = YES;
|
|||
|
||||
@implementation NSCachedImageRep
|
||||
|
||||
- (void) initialize
|
||||
{
|
||||
id obj = [[NSUserDefaults standardUserDefaults]
|
||||
stringForKey: @"ImageCompositing"];
|
||||
if (obj)
|
||||
NSImageCompositing = [obj boolValue];
|
||||
}
|
||||
|
||||
// Initializing an NSCachedImageRep
|
||||
- (id) initWithSize: (NSSize)aSize
|
||||
depth: (NSWindowDepth)aDepth
|
||||
|
@ -154,12 +144,9 @@ static BOOL NSImageCompositing = YES;
|
|||
|
||||
- (BOOL)draw
|
||||
{
|
||||
if (NSImageCompositing)
|
||||
PScomposite(NSMinX(_rect), NSMinY(_rect), NSWidth(_rect), NSHeight(_rect),
|
||||
PScomposite(NSMinX(_rect), NSMinY(_rect), NSWidth(_rect), NSHeight(_rect),
|
||||
[_window gState], NSMinX(_rect), NSMinY(_rect),
|
||||
NSCompositeSourceOver);
|
||||
else
|
||||
NSCopyBits([_window gState], _rect, _rect.origin);
|
||||
return YES;
|
||||
}
|
||||
|
||||
|
@ -177,12 +164,9 @@ static BOOL NSImageCompositing = YES;
|
|||
if ([[ctxt focusView] isFlipped])
|
||||
aPoint.y -= size.height;
|
||||
}
|
||||
if (NSImageCompositing)
|
||||
PScomposite(NSMinX(_rect), NSMinY(_rect), NSWidth(_rect), NSHeight(_rect),
|
||||
PScomposite(NSMinX(_rect), NSMinY(_rect), NSWidth(_rect), NSHeight(_rect),
|
||||
[_window gState], aPoint.x, aPoint.y,
|
||||
NSCompositeSourceOver);
|
||||
else
|
||||
NSCopyBits([_window gState], _rect, aPoint);
|
||||
return NO;
|
||||
}
|
||||
|
||||
|
@ -198,12 +182,9 @@ static BOOL NSImageCompositing = YES;
|
|||
ctxt = GSCurrentContext();
|
||||
if ([[ctxt focusView] isFlipped])
|
||||
aRect.origin.y -= NSHeight(aRect);
|
||||
if (NSImageCompositing)
|
||||
PScomposite(NSMinX(_rect), NSMinY(_rect), NSWidth(_rect), NSHeight(_rect),
|
||||
PScomposite(NSMinX(_rect), NSMinY(_rect), NSWidth(_rect), NSHeight(_rect),
|
||||
[_window gState], NSMinX(aRect), NSMinY(aRect),
|
||||
NSCompositeSourceOver);
|
||||
else
|
||||
NSCopyBits([_window gState], _rect, aRect.origin);
|
||||
return YES;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue