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

version» Context lines:

pike.git/src/modules/Image/blit.c:233:    dest->xsize=x2-x1+1;    dest->ysize=y2-y1+1;       xp=MAXIMUM(0,-x1);    yp=MAXIMUM(0,-y1);    xs=MAXIMUM(0,x1);    ys=MAXIMUM(0,y1);       if( ! (( x2 < 0) || (y2 < 0) || (x1>=img->xsize) || (y1>=img->ysize))) {    -  if (x1<0) x1=0; else if (x1>=img->xsize) x1=img->xsize-1; -  if (y1<0) y1=0; else if (y1>=img->ysize) y1=img->ysize-1; -  if (x2<0) x2=0; else if (x2>=img->xsize) x2=img->xsize-1; -  if (y2<0) y2=0; else if (y2>=img->ysize) y2=img->ysize-1; +  if (x1<0) x1=0; +  if (y1<0) y1=0; +  if (x2>=img->xsize) x2=img->xsize-1; +  if (y2>=img->ysize) y2=img->ysize-1;       img_blit(new+xp+yp*dest->xsize,    img->img+xs+(img->xsize)*ys,    x2-x1+1,    y2-y1+1,    dest->xsize,    img->xsize);       }    dest->img=new;