From f9442133c503ade4df851a798e64b4fd9cb5544f Mon Sep 17 00:00:00 2001 From: fredkiefer Date: Fri, 8 Feb 2008 22:43:13 +0000 Subject: [PATCH] Allow the handling of pre-multiplied bitmaps. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@26044 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 5 +++++ Source/art/ARTContext.m | 11 +++++++++++ 2 files changed, 16 insertions(+) diff --git a/ChangeLog b/ChangeLog index 0fd6d39..57e4375 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-02-08 Fred Kiefer + + * Source/art/ARTContext.m (-GSDrawImage:): Hack to allow the + handling of pre-multiplied bitmaps. + 2008-01-31 Fred Kiefer * Tools/win32pbs.m: Use event polling code from WIN32Server.m. diff --git a/Source/art/ARTContext.m b/Source/art/ARTContext.m index 6338a9c..7a5b4c8 100644 --- a/Source/art/ARTContext.m +++ b/Source/art/ARTContext.m @@ -179,3 +179,14 @@ static int byte_order(void) [(ARTGState *)gstate GSCurrentDevice: device : x : y]; } @end + +@implementation ARTContext (Ops) + +- (void) GSDrawImage: (NSRect) rect: (void *) imageref +{ + // Hack until Art is able to handle premultiplied images + [imageref _unpremultiply]; + [super GSDrawImage: rect : imageref]; +} + +@end