diff --git a/Source/x11/XGBitmapImageRep.m b/Source/x11/XGBitmapImageRep.m index e960978..a87c721 100644 --- a/Source/x11/XGBitmapImageRep.m +++ b/Source/x11/XGBitmapImageRep.m @@ -35,8 +35,8 @@ #include #include -#include -#include +//#include +//#include #include "x11/XGServerWindow.h" #include @@ -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