Logo Search packages:      
Sourcecode: blender version File versions

struct ImBuf* IMB_allocImBuf ( short  x,
short  y,
unsigned char  d,
unsigned int  flags,
unsigned char  bitmap 
) [read]

Attention:
Defined in allocimbuf.c

Definition at line 271 of file allocimbuf.c.

References addzbufImBuf(), ImBuf::depth, ImBuf::ftype, IB_rect, IMB_allocImBuf(), IMB_freeImBuf(), ImBuf::x, and ImBuf::y.

Referenced by IMB_allocImBuf(), IMB_de_interlace(), IMB_double_fast_x(), IMB_double_fast_y(), IMB_dupImBuf(), IMB_half_x(), IMB_half_y(), IMB_halflace(), IMB_onehalf(), and IMB_onethird().

{
      struct ImBuf *ibuf;

      ibuf = MEM_callocN(sizeof(struct ImBuf), "ImBuf_struct");
      if (bitmap) flags |= IB_planes;

      if (ibuf){
            ibuf->x=x;
            ibuf->y=y;
            ibuf->depth=d;
            ibuf->ftype=TGA;

            if (flags & IB_rect){
                  if (imb_addrectImBuf(ibuf)==FALSE){
                        IMB_freeImBuf(ibuf);
                        return (0);
                  }
            }
            
            if (flags & IB_zbuf){
                  if (addzbufImBuf(ibuf)==FALSE){
                        IMB_freeImBuf(ibuf);
                        return (0);
                  }
            }
            
            if (flags & IB_planes){
                  if (imb_addplanesImBuf(ibuf)==FALSE){
                        IMB_freeImBuf(ibuf);
                        return (0);
                  }
            }
      }
      return (ibuf);
}


Generated by  Doxygen 1.6.0   Back to index