Do all bitmap image drawing via GSDrawImage:: to allow better

implementations in backends.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@25600 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2007-11-22 10:47:33 +00:00
parent 0477e36f24
commit 56b6a0ff3e
5 changed files with 64 additions and 40 deletions

View file

@ -297,6 +297,37 @@ void NSCopyBits(int srcGstate, NSRect srcRect, NSPoint destPoint)
NSCompositeCopy);
}
void NSDrawBitmap(NSRect rect,
int pixelsWide,
int pixelsHigh,
int bitsPerSample,
int samplesPerPixel,
int bitsPerPixel,
int bytesPerRow,
BOOL isPlanar,
BOOL hasAlpha,
NSString *colorSpaceName,
const unsigned char *const data[5])
{
NSBitmapImageRep *bitmap;
NSGraphicsContext *ctxt = GSCurrentContext();
bitmap = [[NSBitmapImageRep alloc]
initWithBitmapDataPlanes: data
pixelsWide: pixelsWide
pixelsHigh: pixelsHigh
bitsPerSample: bitsPerSample
samplesPerPixel: samplesPerPixel
hasAlpha: hasAlpha
isPlanar: isPlanar
colorSpaceName: colorSpaceName
bytesPerRow: bytesPerRow
bitsPerPixel: bitsPerPixel];
[ctxt GSDrawImage: rect : bitmap];
RELEASE(bitmap);
}
/*
* Rectangle Drawing
*/