mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-29 20:57:38 +00:00
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:
parent
0477e36f24
commit
56b6a0ff3e
5 changed files with 64 additions and 40 deletions
|
@ -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
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue