void update_gdi_mem3blt(rdpContext* context, MEM3BLT_ORDER* mem3blt) { BYTE style; rdpBitmap* bitmap; rdpCache* cache = context->cache; rdpBrush* brush = &mem3blt->brush; if (mem3blt->cacheId == 0xFF) bitmap = offscreen_cache_get(cache->offscreen, mem3blt->cacheIndex); else bitmap = bitmap_cache_get(cache->bitmap, (BYTE) mem3blt->cacheId, mem3blt->cacheIndex); /* XP-SP2 servers sometimes ask for cached bitmaps they've never defined. */ if (bitmap == NULL) return; style = brush->style; if (brush->style & CACHED_BRUSH) { brush->data = brush_cache_get(cache->brush, brush->index, &brush->bpp); brush->style = 0x03; } mem3blt->bitmap = bitmap; IFCALL(cache->bitmap->Mem3Blt, context, mem3blt); brush->style = style; }
void update_gdi_patblt(rdpUpdate* update, PATBLT_ORDER* patblt) { rdpBrush* brush = &patblt->brush; rdpCache* cache = update->context->cache; if (brush->style & CACHED_BRUSH) { brush->data = brush_cache_get(cache->brush, brush->index, &brush->bpp); brush->style = 0x03; } IFCALL(cache->brush->PatBlt, update, patblt); }
void update_gdi_polygon_cb(rdpContext* context, POLYGON_CB_ORDER* polygon_cb) { BYTE style; rdpBrush* brush = &polygon_cb->brush; rdpCache* cache = context->cache; style = brush->style; if (brush->style & CACHED_BRUSH) { brush->data = brush_cache_get(cache->brush, brush->index, &brush->bpp); brush->style = 0x03; } IFCALL(cache->brush->PolygonCB, context, polygon_cb); brush->style = style; }
void update_gdi_patblt(rdpContext* context, PATBLT_ORDER* patblt) { BYTE style; rdpBrush* brush = &patblt->brush; rdpCache* cache = context->cache; style = brush->style; if (brush->style & CACHED_BRUSH) { brush->data = brush_cache_get(cache->brush, brush->index, &brush->bpp); brush->style = 0x03; } IFCALL(cache->brush->PatBlt, context, patblt); brush->style = style; }
static BOOL update_gdi_patblt(rdpContext* context, PATBLT_ORDER* patblt) { BYTE style; BOOL ret = TRUE; rdpBrush* brush = &patblt->brush; const rdpCache* cache = context->cache; style = brush->style; if (brush->style & CACHED_BRUSH) { brush->data = brush_cache_get(cache->brush, brush->index, &brush->bpp); brush->style = 0x03; } IFCALLRET(cache->brush->PatBlt, ret, context, patblt); brush->style = style; return ret; }
static BOOL update_gdi_polygon_cb(rdpContext* context, POLYGON_CB_ORDER* polygon_cb) { BYTE style; rdpBrush* brush = &polygon_cb->brush; rdpCache* cache = context->cache; BOOL ret = TRUE; style = brush->style; if (brush->style & CACHED_BRUSH) { brush->data = brush_cache_get(cache->brush, brush->index, &brush->bpp); brush->style = 0x03; } IFCALLRET(cache->brush->PolygonCB, ret, context, polygon_cb); brush->style = style; return ret; }
void update_gdi_mem3blt(rdpContext* context, MEM3BLT_ORDER* mem3blt) { uint8 style; rdpBitmap* bitmap; rdpCache* cache = context->cache; rdpBrush* brush = &mem3blt->brush; if (mem3blt->cacheId == 0xFF) bitmap = offscreen_cache_get(cache->offscreen, mem3blt->cacheIndex); else bitmap = bitmap_cache_get(cache->bitmap, (uint8) mem3blt->cacheId, mem3blt->cacheIndex); style = brush->style; if (brush->style & CACHED_BRUSH) { brush->data = brush_cache_get(cache->brush, brush->index, &brush->bpp); brush->style = 0x03; } mem3blt->bitmap = bitmap; IFCALL(cache->bitmap->Mem3Blt, context, mem3blt); brush->style = style; }
void xf_gdi_patblt(rdpUpdate* update, PATBLT_ORDER* patblt) { BRUSH* brush; Pixmap pattern; uint32 foreColor; uint32 backColor; xfInfo* xfi = ((xfContext*) update->context)->xfi; rdpCache* cache = update->context->cache; brush = &patblt->brush; xf_set_rop3(xfi, gdi_rop3_code(patblt->bRop)); foreColor = freerdp_color_convert(patblt->foreColor, xfi->srcBpp, 32, xfi->clrconv); backColor = freerdp_color_convert(patblt->backColor, xfi->srcBpp, 32, xfi->clrconv); if (brush->style & CACHED_BRUSH) { brush->data = brush_cache_get(cache->brush, brush->index, &brush->bpp); brush->style = GDI_BS_PATTERN; } if (brush->style == GDI_BS_SOLID) { XSetFillStyle(xfi->display, xfi->gc, FillSolid); XSetForeground(xfi->display, xfi->gc, patblt->foreColor); XFillRectangle(xfi->display, xfi->drawing, xfi->gc, patblt->nLeftRect, patblt->nTopRect, patblt->nWidth, patblt->nHeight); } else if (brush->style == GDI_BS_PATTERN) { if (brush->bpp > 1) { pattern = xf_brush_new(xfi, 8, 8, brush->bpp, brush->data); XSetFillStyle(xfi->display, xfi->gc, FillTiled); XSetTile(xfi->display, xfi->gc, pattern); XSetTSOrigin(xfi->display, xfi->gc, brush->x, brush->y); XFillRectangle(xfi->display, xfi->drawing, xfi->gc, patblt->nLeftRect, patblt->nTopRect, patblt->nWidth, patblt->nHeight); XSetTile(xfi->display, xfi->gc, xfi->primary); } else { pattern = xf_mono_bitmap_new(xfi, 8, 8, brush->data); XSetForeground(xfi->display, xfi->gc, backColor); XSetBackground(xfi->display, xfi->gc, foreColor); XSetFillStyle(xfi->display, xfi->gc, FillOpaqueStippled); XSetTSOrigin(xfi->display, xfi->gc, brush->x, brush->y); XFillRectangle(xfi->display, xfi->drawing, xfi->gc, patblt->nLeftRect, patblt->nTopRect, patblt->nWidth, patblt->nHeight); XSetStipple(xfi->display, xfi->gc_mono, pattern); } } else { printf("unimplemented brush style:%d\n", brush->style); } if (xfi->drawing == xfi->primary) { XSetFunction(xfi->display, xfi->gc, GXcopy); if (xfi->remote_app != True) { XCopyArea(xfi->display, xfi->primary, xfi->drawable, xfi->gc, patblt->nLeftRect, patblt->nTopRect, patblt->nWidth, patblt->nHeight, patblt->nLeftRect, patblt->nTopRect); } gdi_InvalidateRegion(xfi->hdc, patblt->nLeftRect, patblt->nTopRect, patblt->nWidth, patblt->nHeight); } XSetFunction(xfi->display, xfi->gc, GXcopy); }