419 |
|
|
420 |
switch (opcode) |
switch (opcode) |
421 |
{ |
{ |
422 |
|
case 0x69: /* PDSxxn */ |
423 |
|
ui_memblt(ROP2_XOR, x, y, cx, cy, src, srcx, srcy); |
424 |
|
ui_patblt(ROP2_NXOR, x, y, cx, cy, |
425 |
|
brush, bgcolour, fgcolour); |
426 |
|
break; |
427 |
|
|
428 |
case 0xb8: /* PSDPxax */ |
case 0xb8: /* PSDPxax */ |
429 |
ui_patblt(ROP2_XOR, x, y, cx, cy, |
ui_patblt(ROP2_XOR, x, y, cx, cy, |
430 |
brush, bgcolour, fgcolour); |
brush, bgcolour, fgcolour); |
431 |
ui_memblt(ROP2_AND, x, y, cx, cy, |
ui_memblt(ROP2_AND, x, y, cx, cy, src, srcx, srcy); |
|
src, srcx, srcy); |
|
432 |
ui_patblt(ROP2_XOR, x, y, cx, cy, |
ui_patblt(ROP2_XOR, x, y, cx, cy, |
433 |
brush, bgcolour, fgcolour); |
brush, bgcolour, fgcolour); |
434 |
break; |
break; |
435 |
|
|
436 |
default: |
default: |
437 |
NOTIMP("triblt 0x%x\n", opcode); |
NOTIMP("triblt 0x%x\n", opcode); |
438 |
ui_memblt(ROP2_COPY, x, y, cx, cy, |
ui_memblt(ROP2_COPY, x, y, cx, cy, src, srcx, srcy); |
|
brush, bgcolour, fgcolour); |
|
439 |
} |
} |
440 |
} |
} |
441 |
|
|
527 |
void ui_desktop_save(uint32 offset, int x, int y, int cx, int cy) |
void ui_desktop_save(uint32 offset, int x, int y, int cx, int cy) |
528 |
{ |
{ |
529 |
XImage *image; |
XImage *image; |
|
int scanline; |
|
530 |
|
|
|
scanline = (cx + 3) & ~3; |
|
|
DEBUG("XGetImage(%p,%x,%d,%d,%d,%d,%x,%d)\n", display, wnd, x, y, |
|
|
cx, cy, 0xffffffff, ZPixmap); |
|
531 |
image = XGetImage(display, wnd, x, y, cx, cy, 0xffffffff, ZPixmap); |
image = XGetImage(display, wnd, x, y, cx, cy, 0xffffffff, ZPixmap); |
532 |
cache_put_desktop(offset, scanline*cy, image->data); |
cache_put_desktop(offset, cx, cy, image->bytes_per_line, image->data); |
533 |
XFree(image->data); |
XFree(image->data); |
534 |
XFree(image); |
XFree(image); |
535 |
} |
} |
537 |
void ui_desktop_restore(uint32 offset, int x, int y, int cx, int cy) |
void ui_desktop_restore(uint32 offset, int x, int y, int cx, int cy) |
538 |
{ |
{ |
539 |
XImage *image; |
XImage *image; |
|
int scanline; |
|
540 |
uint8 *data; |
uint8 *data; |
541 |
|
|
542 |
scanline = (cx + 3) & ~3; |
data = cache_get_desktop(offset, cx, cy); |
|
data = cache_get_desktop(offset, scanline*cy); |
|
543 |
if (data == NULL) |
if (data == NULL) |
544 |
return; |
return; |
545 |
|
|
546 |
image = XCreateImage(display, visual, 8, ZPixmap, 0, |
image = XCreateImage(display, visual, 8, ZPixmap, 0, |
547 |
data, cx, cy, 32, scanline); |
data, cx, cy, 32, cx); |
548 |
XSetFunction(display, gc, GXcopy); |
XSetFunction(display, gc, GXcopy); |
549 |
XPutImage(display, wnd, gc, image, 0, 0, x, y, cx, cy); |
XPutImage(display, wnd, gc, image, 0, 0, x, y, cx, cy); |
550 |
XFree(image); |
XFree(image); |