File: bitmap.c

package info (click to toggle)
autotrace 0.31.1-16
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 3,800 kB
  • sloc: ansic: 15,092; sh: 6,972; makefile: 273
file content (25 lines) | stat: -rw-r--r-- 574 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/* bitmap.c: operations on bitmaps. */

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif /* Def: HAVE_CONFIG_H */

#include "bitmap.h"
#include "xstd.h"

bitmap_type
new_bitmap (unsigned short width, unsigned short height)
{
  return at_bitmap_init(NULL,width,height,1);
}

/* Free the storage that is allocated for a bitmap.  On the other hand,
   the bitmap might not have any storage allocated for it if it is zero
   in either dimension; in that case, don't free it.  */

void
free_bitmap (bitmap_type *b)
{
  if (BITMAP_BITS (*b) != NULL)
    free (BITMAP_BITS (*b));
}