mirror of
https://github.com/gnustep/libs-back.git
synced 2025-02-24 04:11:28 +00:00
Removed the xPixmap methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@15833 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
9fb482ea8f
commit
8dcfa3a567
1 changed files with 2 additions and 47 deletions
|
@ -35,8 +35,8 @@
|
|||
|
||||
#include <config.h>
|
||||
#include <stdlib.h>
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xutil.h>
|
||||
//#include <X11/Xlib.h>
|
||||
//#include <X11/Xutil.h>
|
||||
|
||||
#include "x11/XGServerWindow.h"
|
||||
#include <Foundation/NSData.h>
|
||||
|
@ -52,11 +52,6 @@
|
|||
#include "x11/wraster.h"
|
||||
#endif
|
||||
|
||||
@interface NSBitmapImageRep (BackEnd)
|
||||
- (Pixmap) xPixmapMask;
|
||||
@end
|
||||
|
||||
|
||||
@implementation NSBitmapImageRep (Backend)
|
||||
|
||||
#ifdef WITH_WRASTER
|
||||
|
@ -128,44 +123,4 @@
|
|||
}
|
||||
#endif /* WITH_WRASTER */
|
||||
|
||||
- (Pixmap) xPixmapMask
|
||||
{
|
||||
unsigned char *bData;
|
||||
NSGraphicsContext *ctxt = (NSGraphicsContext*)GSCurrentContext();
|
||||
gswindow_device_t *gs_win;
|
||||
// Only produce pixmaps for meshed images with alpha
|
||||
if ((_numColors != 4) || _isPlanar)
|
||||
return 0;
|
||||
bData = [self bitmapData];
|
||||
|
||||
[ctxt GSCurrentDevice: (void**)&gs_win : NULL : NULL];
|
||||
|
||||
// FIXME: This optimistic computing works only, if there are no
|
||||
// additional bytes at the end of a line.
|
||||
return xgps_cursor_mask (gs_win->display, GET_XDRAWABLE(gs_win),
|
||||
bData, _pixelsWide, _pixelsHigh, _numColors);
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@implementation NSImage (Backend)
|
||||
|
||||
- (Pixmap) xPixmapMask
|
||||
{
|
||||
NSArray *reps = [self representations];
|
||||
NSEnumerator *enumerator = [reps objectEnumerator];
|
||||
NSImageRep *rep;
|
||||
|
||||
while ((rep = [enumerator nextObject]) != nil)
|
||||
{
|
||||
if ([rep isKindOfClass: [NSBitmapImageRep class]])
|
||||
{
|
||||
return [(NSBitmapImageRep*)rep xPixmapMask];
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
Loading…
Reference in a new issue