if (fec->DisplayPixmap) fec->DisplayPixmap( pContext, image, mask, x, y, x_offset, y_offset, req_w, req_h);
img_client_data = (fe_PixmapClientData *)image->client_data; if (!img_client_data) return; img_x_pixmap = img_client_data->pixmap; if (!img_x_pixmap) return; if (mask) { mask_client_data = (fe_PixmapClientData *)mask->client_data; mask_x_pixmap = mask_client_data->pixmap; }   if (context->type == MWContextIcon) { if (fec->DisplayPixmap) fec->DisplayPixmap( context, image, mask, (PRInt32)width, (PRInt32)height); return; }   if ((x_offset + width > img_width) || (y_offset + height > img_height)) tiling_required = TRUE;   img_x_offset = x - CONTEXT_DATA(context)->document_x + fe_drawable->x_origin; img_y_offset = y - CONTEXT_DATA(context)->document_y + fe_drawable->y_origin;   rect_x_offset = img_x_offset + x_offset; rect_y_offset = img_y_offset + y_offset;   memset(&gcv, ~0, sizeof (XGCValues)); if (mask) {                  if (tiling_required) {  int x_tile_offset = img_x_offset - rect_x_offset; int y_tile_offset = img_y_offset - rect_y_offset; Pixmap tmp_pixmap = 0;   tmp_pixmap = fe_TiledMaskWithClipRegion(dpy, drawable, mask_x_pixmap, width, height, x_tile_offset, y_tile_offset, -rect_x_offset, -rect_y_offset, fe_drawable->clip_region);   gcv.fill_style = FillTiled; gcv.tile = img_x_pixmap; gcv.ts_x_origin = img_x_offset; gcv.ts_y_origin = img_y_offset; gcv.clip_mask = tmp_pixmap; gcv.clip_x_origin = rect_x_offset; gcv.clip_y_origin = rect_y_offset; flags = GCFillStyle | GCTile | GCTileStipXOrigin | GCTileStipYOrigin | GCClipMask | GCClipXOrigin | GCClipYOrigin; gc = XCreateGC(dpy, drawable, flags, &gcv);   XFillRectangle (dpy, drawable, gc, rect_x_offset, rect_y_offset, width, height);   XFreeGC(dpy, gc); XFreePixmap(dpy, tmp_pixmap); } else {                   if (fe_drawable->clip_region) {   fe_DrawMaskedImageWithClipRegion(dpy, drawable, img_x_pixmap, mask_x_pixmap, width, height, img_x_offset, img_y_offset, x_offset, y_offset, fe_drawable->clip_region); } else {                } } } else {                       if (tiling_required) {  gcv.fill_style = FillTiled; gcv.tile = img_x_pixmap; gcv.ts_x_origin = img_x_offset; gcv.ts_y_origin = img_y_offset; flags = GCFillStyle | GCTile | GCTileStipXOrigin | GCTileStipYOrigin; if (fe_drawable->clip_region) gc = fe_GetGCfromDW(dpy, drawable, flags, &gcv, fe_drawable->clip_region); else gc = fe_GetGCfromDW(dpy, drawable, flags, &gcv, NULL);   XFillRectangle (dpy, drawable, gc, rect_x_offset, rect_y_offset, width, height); } else {                    gcv.function = GXcopy; if (fe_drawable->clip_region) gc = fe_GetGCfromDW(dpy, drawable, GCFunction, &gcv, fe_drawable->clip_region); else gc = fe_GetGCfromDW(dpy, drawable, GCFunction, &gcv, NULL);   XCopyArea (dpy, img_x_pixmap, drawable, gc, x_offset, y_offset, width, height, rect_x_offset, rect_y_offset); } }
JMC_PUBLIC_API(void)_IMGCB_DisplayPixmap(IMGCB* img_cb, jint op, void* dpy_cx, IL_Pixmap* image,                     IL_Pixmap* mask, jint x, jint y, jint x_offset,                     jint y_offset, jint width, jint height, jint req_w, jint req_h){     MWContext *pContext = (MWContext *)dpy_cx;     fe_ContextData  *fec = (pContext)->fe.data;                            /* (fe_ContextData *) pContext->fe.data; */     /* Call the context specific displayPixmap function */     if (fec->DisplayPixmap)       fec->DisplayPixmap( pContext, image, mask, x, y, x_offset, y_offset, req_w, req_h);}