47 |
BOOL g_enable_compose = False; |
BOOL g_enable_compose = False; |
48 |
BOOL g_Unobscured; /* used for screenblt */ |
BOOL g_Unobscured; /* used for screenblt */ |
49 |
static GC g_gc = NULL; |
static GC g_gc = NULL; |
50 |
|
static GC g_create_bitmap_gc = NULL; |
51 |
|
static GC g_create_glyph_gc = NULL; |
52 |
static Visual *g_visual; |
static Visual *g_visual; |
53 |
static int g_depth; |
static int g_depth; |
54 |
static int g_bpp; |
static int g_bpp; |
971 |
if (g_gc == NULL) |
if (g_gc == NULL) |
972 |
g_gc = XCreateGC(g_display, g_wnd, 0, NULL); |
g_gc = XCreateGC(g_display, g_wnd, 0, NULL); |
973 |
|
|
974 |
|
if (g_create_bitmap_gc == NULL) |
975 |
|
g_create_bitmap_gc = XCreateGC(g_display, g_wnd, 0, NULL); |
976 |
|
|
977 |
if ((g_ownbackstore) && (g_backstore == 0)) |
if ((g_ownbackstore) && (g_backstore == 0)) |
978 |
{ |
{ |
979 |
g_backstore = XCreatePixmap(g_display, g_wnd, g_width, g_height, g_depth); |
g_backstore = XCreatePixmap(g_display, g_wnd, g_width, g_height, g_depth); |
1486 |
image = XCreateImage(g_display, g_visual, g_depth, ZPixmap, 0, |
image = XCreateImage(g_display, g_visual, g_depth, ZPixmap, 0, |
1487 |
(char *) tdata, width, height, bitmap_pad, 0); |
(char *) tdata, width, height, bitmap_pad, 0); |
1488 |
|
|
1489 |
XPutImage(g_display, bitmap, g_gc, image, 0, 0, 0, 0, width, height); |
XPutImage(g_display, bitmap, g_create_bitmap_gc, image, 0, 0, 0, 0, width, height); |
1490 |
|
|
1491 |
XFree(image); |
XFree(image); |
1492 |
if (tdata != data) |
if (tdata != data) |
1544 |
XImage *image; |
XImage *image; |
1545 |
Pixmap bitmap; |
Pixmap bitmap; |
1546 |
int scanline; |
int scanline; |
|
GC gc; |
|
1547 |
|
|
1548 |
scanline = (width + 7) / 8; |
scanline = (width + 7) / 8; |
1549 |
|
|
1550 |
bitmap = XCreatePixmap(g_display, g_wnd, width, height, 1); |
bitmap = XCreatePixmap(g_display, g_wnd, width, height, 1); |
1551 |
gc = XCreateGC(g_display, bitmap, 0, NULL); |
if (g_create_glyph_gc == 0) |
1552 |
|
g_create_glyph_gc = XCreateGC(g_display, bitmap, 0, NULL); |
1553 |
|
|
1554 |
image = XCreateImage(g_display, g_visual, 1, ZPixmap, 0, (char *) data, |
image = XCreateImage(g_display, g_visual, 1, ZPixmap, 0, (char *) data, |
1555 |
width, height, 8, scanline); |
width, height, 8, scanline); |
1557 |
image->bitmap_bit_order = MSBFirst; |
image->bitmap_bit_order = MSBFirst; |
1558 |
XInitImage(image); |
XInitImage(image); |
1559 |
|
|
1560 |
XPutImage(g_display, bitmap, gc, image, 0, 0, 0, 0, width, height); |
XPutImage(g_display, bitmap, g_create_glyph_gc, image, 0, 0, 0, 0, width, height); |
1561 |
|
|
1562 |
XFree(image); |
XFree(image); |
|
XFreeGC(g_display, gc); |
|
1563 |
return (HGLYPH) bitmap; |
return (HGLYPH) bitmap; |
1564 |
} |
} |
1565 |
|
|