void make_bitmap_icon(struct variant *v, struct sym_icon *si)
{
- v->width = si->sir.icon->width;
- v->height = si->sir.icon->height;
- v->bitmap = malloc((int) ceil(v->width * v->height * sizeof(bool)));
+ v->width = si->sir.width + 1;
+ v->height = si->sir.height + 1;
+ v->bitmap = malloc(v->width * v->height * sizeof(bool));
for (int i=0; i<v->width*v->height; i++) v->bitmap[i] = 1;
}
void make_bitmap_point(struct variant *v, struct sym_point *sp)
{
- v->width = v->height = sp->size;
- v->bitmap = malloc(sp->size*sp->size * sizeof(bool));
+ v->width = v->height = sp->size + 1;
+ v->bitmap = malloc(v->width * v->height * sizeof(bool));
// FIXME: Okay, memset would be much nicer here
for (int i=0; i<sp->size*sp->size; i++) v->bitmap[i] = 1;
}