pike.git / src / modules / Image / blit.c

version» Context lines:

pike.git/src/modules/Image/blit.c:1: - /* $Id: blit.c,v 1.47 2000/08/15 12:40:57 grubba Exp $ */ + /* $Id: blit.c,v 1.48 2000/08/23 18:57:27 grubba Exp $ */   #include "global.h"      /*   **! module Image   **! note - **! $Id: blit.c,v 1.47 2000/08/15 12:40:57 grubba Exp $ + **! $Id: blit.c,v 1.48 2000/08/23 18:57:27 grubba Exp $   **! class Image   */      #include <math.h>   #include <ctype.h>      #include "stralloc.h"   #include "global.h"   #include "pike_macros.h"   #include "object.h"
pike.git/src/modules/Image/blit.c:99:       if (max<3 || args-args_start<3) return 0;       for (i=0; i<3; i++)    if (sp[-args+i+args_start].type!=T_INT)    error("Illegal r,g,b argument to %s\n",name);    img->rgb.r=(unsigned char)sp[-args+args_start].u.integer;    img->rgb.g=(unsigned char)sp[1-args+args_start].u.integer;    img->rgb.b=(unsigned char)sp[2-args+args_start].u.integer;    -  if (max > 3 && args-args_start>=4) -  if (sp[3-args+args_start].type!=T_INT) +  if (max > 3 && args-args_start>=4) { +  if (sp[3-args+args_start].type!=T_INT) {    error("Illegal alpha argument to %s\n",name); -  else -  { +  }    img->alpha=sp[3-args+args_start].u.integer;    return 4;    } -  else -  { +     img->alpha=0;    return 3;   } - } +          /*** end internals ***/         void img_clear(rgb_group *dest, rgb_group rgb, ptrdiff_t size)   {    if(!size) return;    THREADS_ALLOW();    if( ( rgb.r == rgb.g && rgb.r == rgb.b ) )