void exit_pixtemp(int id, int vp_id,int x, int y) { float dx, dy; if (! xwini[id].xlib_pixcopymode) return; x -= tempx; y -= tempy; if (pixclamp) { x=max(clampx1,x); x=min(clampx2,x); y=max(clampy1,y); y=min(clampy2,y); } XFreePixmap(INTERNAL_display, pixtemp); xwini[id].xlib_pixcopymode = FALSE; if (temp_dx == 0 || temp_dy == 0) return; dx = (float) x /(float) temp_dx; dy = (float) y /(float) temp_dy; if (tempbufflag) { xwini[id].double_buffering = TRUE; xwini[id].xdraw = xwini[id].xpix; } /* dy is upside down */ if (INTERNAL_update_scrollbars(id, vp_id, -dx, dy) == G_ERROR) if (xwini[id].double_buffering) XCopyArea(INTERNAL_display, xwini[id].xwin, xwini[id].xpix, gc_pix, tempx1, tempy1, temp_dx, temp_dy, tempx1, tempy1); }
static void exit_pixtemp(int id, int vp_id, int x, int y) { float dx, dy; if (!WI[id].pixcopymode) return; x -= tempx; y -= tempy; if (pixclamp) { x = max(clampx1, x); x = min(clampx2, x); y = max(clampy1, y); y = min(clampy2, y); } DeleteObject(pixtemp); WI[id].pixcopymode = FALSE; if (temp_dx == 0 || temp_dy == 0) return; dx = (float) x / (float) temp_dx; dy = (float) y / (float) temp_dy; if (WI[id].locked) WI[id].locked = FALSE; /* dy is upside down */ INTERNAL_clear_pixmap(id); if (INTERNAL_update_scrollbars(id, vp_id, -dx, dy) == G_ERROR) if (WI[id].usepix) copy_screen2pix(id); }