WORD new_img(VOID) { WORD abtn; if ( icn_edited && !rcs_xpert ) { if ( (abtn = abandon_button()) == 1 ) { clear_img(); return( TRUE ); } else if (abtn == 2) /* Save Changes */ { if ( icn_state == NOFILE_STATE) return( svas_icn()); else return( save_icn()); } else /* cancel */ return (FALSE); } else { clear_img(); return( TRUE ); } }
/* Function: render_scene Scene should be assembled here. TODO: rework Parameters: counter - pointer to snapshot's point counter */ void render_scene(float y, float p, Snapshot *snap, uint32_t *counter) { uint32_t i; uint32_t cnt = *counter; clear_zbuffer(); clear_img(CLEAR_COLOR); yaw = y; pitch = p; compute_yp(); /* render here */ render_cloud(&cloud,0,0,0,1); /* end */ for (i=0; i<WIDTH*HEIGHT; i++) { if (img[i] != CLEAR_COLOR) { snap->x[cnt] = shrink(Xbuf[i], shrink_val); snap->y[cnt] = shrink(Ybuf[i], shrink_val); snap->z[cnt] = shrink(Zbuf[i], shrink_val); snap->nx[cnt] = NXbuf[i]; snap->ny[cnt] = NYbuf[i]; snap->nz[cnt] = NZbuf[i]; snap->sh[cnt] = SHbuf[i]; snap->c[cnt] = true2high(img[i]); cnt++; } } *counter = cnt; }
int expose_hook(void *data) { t_coord p; t_data *d; t_map *m; p = set_coord(-1, -1); d = (t_data*)data; m = &(d->map); clear_img(&(d->img)); while (++p.y < m->hgt) { p.x = -1; while (++p.x < m->wth) { if (m->dot[p.y][p.x].y) { if (p.y && m->dot[p.y - 1][p.x].y) iso_projection(d, p, set_coord(1, -1), set_coord(0, -1)); if (p.x && m->dot[p.y][p.x - 1].y) iso_projection(d, p, set_coord(-1, -1), set_coord(-1, 0)); } } } mlx_clear_window(d->mlx, d->win); mlx_put_image_to_window(d->mlx, d->win, d->img.i, 0, 0); return (1); }
ImagesList::~ImagesList() { #ifdef __images_list_debug qDebug("~ImagesList()"); #endif clear_img(); };
void put_rain(t_mod *mod) { mod->check = 1; #ifdef FT clear_img(mod, mod->img2); #endif #ifdef HOME clear_img(mod, mod->img2); clear_img(mod, mod->img1); #endif // particules handling if (mod->st_lm) set_lm_rain(mod, mod->rain->l_mesh); if (mod->upd_sm) { if (mod->plane && mod->plane->plan) { set_gbase_trans(mod, mod->plane->plan); update_sm(mod, mod->plane->plan); } set_gbase_trans(mod, mod->rain); update_sm(mod, mod->rain); } #ifdef FT draw_obj(mod, mod->rain, mod->img2); #endif #ifdef HOME draw_obj(mod, mod->rain, mod->img1); if (mod->plane && mod->plane->plan) draw_obj(mod, mod->plane->plan, mod->img1); #endif if (mod->st_lm) { if (!mod->check) { mod->st_lm = 0; mod->upd_sm = 0; } } }
int grpx_link_draw_logo(VDIS_DEV devId, UInt32 startX, UInt32 startY, Bool clearImg) { int ret=0; unsigned char * img_ti_logo = NULL; app_grpx_t *grpx = &grpx_obj; if(grpx->planeType >= GRPX_FORMAT_MAX) { return -1; } if(grpx->planeType == GRPX_FORMAT_RGB565) { img_ti_logo = (unsigned char *)img_ti_logo_RGB565; grpx->iconWidth = 226; grpx->iconHeight = 31; } if(grpx->planeType == GRPX_FORMAT_RGB888) { img_ti_logo = (unsigned char *)img_ti_logo_RGB888; grpx->iconWidth = 240; grpx->iconHeight = 60; } if (devId == VDIS_DEV_HDMI) { if(clearImg) { clear_img( devId, grpx->buf[0], startX, startY, grpx->iconWidth, grpx->iconHeight ); } else { draw_img( devId, grpx->buf[0], img_ti_logo, startX, startY, grpx->iconWidth, grpx->iconHeight ); } } return ret; }
void real_rain(t_mod *mod) { if (mod->pt_surf) { clear_img(mod, mod->img1); tab_zero(mod->img_tab); if (mod->upd_sm) update_sm(mod, mod->obj); draw_obj(mod, mod->obj, mod->img1); mod->pt_surf = 0; } put_rain(mod); mod->ind_h++; #ifdef FT on_window(mod, 1, 1, 0); #endif #ifdef HOME on_window(mod, 1, 0, 0); #endif }
void ImagesList::clear() { clear_img(); // hide(); };