From: Paul Bramel Subject: GRX Pixmap data format To: djgpp AT sun DOT soe DOT clarkson DOT edu (djgpp mail list) Date: Wed, 8 Sep 93 15:27:37 CDT Mailer: Elm [revision: 66.25] Hello, I'm having a problem with the GrBuildPixmapFromBits() function from libgrx. What is the format for the data parameter? What I want to do is build a pixmap from an X-Window bitmap file, but when using GrBuildPixmapFromBitsBits() and GrPatternFilledBox(), the pattern comes out shifted. === code fragment===== #include "test.bmp" GrPattern *p; p=GrBuildPixmapFromBits(test_bits,test_width,test_height,GrWhite(),GrBlack()); GrPatternFilledBox(0, 0, test_width, test_height, p); === end code ======== =========== test.bmp ============ #define test_width 16 #define test_height 16 static char test_bits[] = { 0x60, 0x06, 0x60, 0x06, 0x60, 0x06, 0x60, 0x06, 0x60, 0x06, 0x7f, 0xfe, 0x7f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xfe, 0x7f, 0xfe, 0x60, 0x06, 0x60, 0x06, 0x60, 0x06, 0x60, 0x06, 0x60, 0x06}; =========== end test.bmp ======= The displays look something like this: In X-Windows: In LIBGRX: ------------- ---------------- ## ## ## ## ## ## ########### ### ## ## ########### ### ## ## ## ## ## ## ## ## ####### ####### ## ## ####### ####### ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## Any ideas? Paul Bramel paulbr AT comm DOT mot DOT com