summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Fl_Pixmap.cxx10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/Fl_Pixmap.cxx b/src/Fl_Pixmap.cxx
index 4b76c5e0d..2c780d326 100644
--- a/src/Fl_Pixmap.cxx
+++ b/src/Fl_Pixmap.cxx
@@ -141,22 +141,14 @@ void Fl_GDI_Graphics_Driver::draw(Fl_Pixmap *pxm, int XP, int YP, int WP, int HP
if(hMod) fl_TransparentBlt = (fl_transp_func)GetProcAddress(hMod, "TransparentBlt");
}
if (fl_TransparentBlt) {
- Fl_Offscreen tmp_id = fl_create_offscreen(pxm->w(), pxm->h());
- fl_begin_offscreen(tmp_id);
- uchar *bitmap = 0;
- fl_mask_bitmap = &bitmap;
- // draw pixmap to offscreen
- fl_draw_pixmap(pxm->data(), 0, 0);
- fl_end_offscreen();
HDC new_gc = CreateCompatibleDC(fl_gc);
int save = SaveDC(new_gc);
- SelectObject(new_gc, (void*)tmp_id);
+ SelectObject(new_gc, (void*)pxm->id_);
// print all of offscreen but its parts in background color
extern UINT win_pixmap_bg_color; // computed by fl_draw_pixmap()
fl_TransparentBlt(fl_gc, X, Y, W, H, new_gc, cx, cy, pxm->w(), pxm->h(), win_pixmap_bg_color );
RestoreDC(new_gc,save);
DeleteDC(new_gc);
- fl_delete_offscreen(tmp_id);
}
else {
fl_copy_offscreen(X, Y, W, H, (Fl_Offscreen)pxm->id_, cx, cy);