Logo Search packages:      
Sourcecode: blender version File versions

struct ImBuf* IMB_double_fast_x ( struct ImBuf ibuf1  )  [read]

Attention:
defined in scaling.c

Definition at line 96 of file scaling.c.

References ImBuf::depth, IMB_allocImBuf(), IMB_double_fast_x(), ImBuf::rect, ImBuf::x, and ImBuf::y.

Referenced by IMB_double_fast_x(), and IMB_double_x().

{
      struct ImBuf *ibuf2;
      int *p1,*dest, i, col;

      if (ibuf1==0) return (0);
      if (ibuf1->rect == 0) return (0);

      ibuf2 = IMB_allocImBuf(2 * ibuf1->x , ibuf1->y , ibuf1->depth,1,0);
      if (ibuf2==0) return (0);

      p1 = (int *) ibuf1->rect;
      dest=(int *) ibuf2->rect;

      for(i = ibuf1->y * ibuf1->x ; i>0 ; i--) {
            col = *p1++;
            *dest++ = col;
            *dest++ = col;
      }

      return (ibuf2);
}


Generated by  Doxygen 1.6.0   Back to index