1 /* bitmap.c: operations on bitmaps. */ 2 3 #ifdef HAVE_CONFIG_H 4 #include "config.h" 5 #endif /* Def: HAVE_CONFIG_H */ 6 7 #include "bitmap.h" 8 #include "xstd.h" 9 10 bitmap_type new_bitmap(unsigned short width,unsigned short height)11new_bitmap (unsigned short width, unsigned short height) 12 { 13 return at_bitmap_init(NULL,width,height,1); 14 } 15 16 /* Free the storage that is allocated for a bitmap. On the other hand, 17 the bitmap might not have any storage allocated for it if it is zero 18 in either dimension; in that case, don't free it. */ 19 20 void free_bitmap(bitmap_type * b)21free_bitmap (bitmap_type *b) 22 { 23 if (BITMAP_BITS (*b) != NULL) 24 free (BITMAP_BITS (*b)); 25 } 26