/[rdesktop]/sourceforge.net/trunk/rdesktop/xwin.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /sourceforge.net/trunk/rdesktop/xwin.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 12 by matty, Tue Aug 15 12:01:01 2000 UTC revision 16 by matty, Thu Sep 28 07:04:14 2000 UTC
# Line 419  void ui_triblt(uint8 opcode, Line 419  void ui_triblt(uint8 opcode,
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    
# Line 523  void ui_draw_text(uint8 font, uint8 flag Line 527  void ui_draw_text(uint8 font, uint8 flag
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  }  }
# Line 537  void ui_desktop_save(uint32 offset, int Line 537  void ui_desktop_save(uint32 offset, int
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);

Legend:
Removed from v.12  
changed lines
  Added in v.16

  ViewVC Help
Powered by ViewVC 1.1.26