Moved image drawing change from gui to here.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@25601 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2007-11-22 12:14:48 +00:00
parent 6446016974
commit 1966afda06
2 changed files with 16 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2007-11-22 Fred Kiefer <FredKiefer@gmx.de>
* Source/gsc/GSContext.m (-GSDrawImage:):Implement via
NSDrawBitmap::::::.
2007-11-09 Adam Fedor <fedor@gnu.org>
* Version 0.13.0

View file

@ -27,6 +27,7 @@
#include <AppKit/AppKitExceptions.h>
#include <AppKit/NSAffineTransform.h>
#include <AppKit/NSBitmapImageRep.h>
#include <AppKit/NSColor.h>
#include <AppKit/NSView.h>
#include <AppKit/NSWindow.h>
@ -809,7 +810,16 @@ static NSMapTable *gtable;
- (void) GSDrawImage: (NSRect) rect: (void *) imageref
{
[self notImplemented: _cmd];
NSBitmapImageRep *bitmap;
const unsigned char *data[5];
bitmap = (NSBitmapImageRep*)imageref;
[bitmap getBitmapDataPlanes: &data];
[self NSDrawBitmap: rect : [bitmap pixelsWide] : [bitmap pixelsHigh]
: [bitmap bitsPerSample] : [bitmap samplesPerPixel]
: [bitmap bitsPerPixel] : [bitmap bytesPerRow] : [bitmap isPlanar]
: [bitmap hasAlpha] : [bitmap colorSpaceName]
: data];
}
/* ----------------------------------------------------------------------- */