Logo Search packages:      
Sourcecode: blender version File versions

struct ImBuf* IMB_scaleImBuf ( struct ImBuf ibuf,
short  newx,
short  newy 
) [read]

Attention:
Defined in scaling.c

Definition at line 593 of file scaling.c.

References IMB_scaleImBuf(), ImBuf::rect, ImBuf::x, and ImBuf::y.

Referenced by IMB_scalefieldImBuf(), and IMB_scaleImBuf().

{
      if (ibuf == 0) return (0);
      if (ibuf->rect == 0) return (ibuf);

      // scaleup / scaledown functions below change ibuf->x and ibuf->y
      // so we first scale the Z-buffer (if any)
      scalefast_Z_ImBuf(ibuf, newx, newy);

      if (newx < ibuf->x) if (newx) scaledownx(ibuf,newx);
      if (newy < ibuf->y) if (newy) scaledowny(ibuf,newy);
      if (newx > ibuf->x) if (newx) scaleupx(ibuf,newx);
      if (newy > ibuf->y) if (newy) scaleupy(ibuf,newy);
      
      return(ibuf);
}


Generated by  Doxygen 1.6.0   Back to index