added raster operations
authorMatt Hortman <matt@FlintRiverSystems.com>
Thu, 23 Feb 2012 20:38:17 +0000 (15:38 -0500)
committerMatt Hortman <matt@FlintRiverSystems.com>
Thu, 23 Feb 2012 20:38:17 +0000 (15:38 -0500)
src/rdp_gdi.c

index 30b4db2..7688718 100755 (executable)
@@ -73,11 +73,23 @@ void guac_rdp_gdi_memblt(rdpContext* context, MEMBLT_ORDER* memblt) {
     guac_socket* socket = client->socket;
     guac_rdp_bitmap* bitmap = (guac_rdp_bitmap*) memblt->bitmap;
 
+       guac_composite_mode cmode = GUAC_COMP_OVER;
+
+       if (memblt->bRop == 204) cmode = GUAC_COMP_OVER;
+       else if (memblt->bRop == 238) cmode = GUAC_COMP_OR;
+       else if (memblt->bRop == 136) cmode = GUAC_COMP_AND;
+       else if (memblt->bRop == 102) cmode = GUAC_COMP_XOR2;
+       else if (memblt->bRop == 187) cmode = GUAC_COMP_NOR;
+       else
+       {
+               guac_client_log_info (client, "guac_rdp_gdi_memblt: UNSUPPORTED opcode = %d (0x%02X)", memblt->bRop, memblt->bRop);
+       }
+
     if (bitmap->layer != NULL)
         guac_protocol_send_copy(socket,
                 bitmap->layer,
                 memblt->nXSrc, memblt->nYSrc, memblt->nWidth, memblt->nHeight,
-                GUAC_COMP_OVER,
+                cmode,
                 current_layer, memblt->nLeftRect, memblt->nTopRect);
 
 }