void *
GdItemAlloc(unsigned int size)
{
return (void *)calloc(size, 1);
}
typedef struct {
MWGDIOBJHDR hdr;
int width; /* width*/
int height; /* height*/
int planes; /* # planes*/
int bpp; /* bits per pixel*/
int linelen; /* bytes per line*/
int size; /* allocated size in bytes*/
char bits[1]; /* beginning of bitmap*/
} MWBITMAPOBJ;
/* allocate gdi object*/
hbitmap = (MWBITMAPOBJ *)GdItemAlloc(sizeof(MWBITMAPOBJ)-1+size);
hbitmap->size = size;