* Source/gsc/GSStreamContext.m: Added implementation for GSDrawImage.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@26305 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
gcasa 2008-03-15 21:49:56 +00:00
parent 3b4c281568
commit 483f98475b
2 changed files with 23 additions and 1 deletions

View file

@ -1,3 +1,7 @@
2008-03-15 17:48-EST Gregory John Casamento <greg_casamento@yahoo.com>
* Source/gsc/GSStreamContext.m: Added implementation for GSDrawImage.
2008-03-13 19:37-EST Gregory John Casamento <greg_casamento@yahoo.com>
* Source/gsc/GSStreamContext.m: Remove implementation of

View file

@ -33,6 +33,7 @@
#include <AppKit/NSAffineTransform.h>
#include <AppKit/NSBezierPath.h>
#include <AppKit/NSView.h>
#include <AppKit/NSBitmapImageRep.h>
#include <Foundation/NSArray.h>
#include <Foundation/NSData.h>
#include <Foundation/NSDebug.h>
@ -826,7 +827,24 @@ fpfloat(FILE *stream, float f)
- (void) GSDrawImage: (NSRect)rect : (void *)imageref
{
[self notImplemented: _cmd];
id image = (id)imageref;
unsigned char *imagePlanes[5];
if([image isKindOfClass: [NSBitmapImageRep class]])
{
[image getBitmapDataPlanes: imagePlanes];
[self NSDrawBitmap: rect
: [image pixelsWide]
: [image pixelsHigh]
: [image bitsPerSample]
: [image samplesPerPixel]
: [image bitsPerPixel]
: [image bytesPerRow]
: [image isPlanar]
: [image hasAlpha]
: [image colorSpaceName]
: (const unsigned char **)imagePlanes];
}
}