int w=(int)(desc.get_w()*zoom);
int h=(int)(desc.get_h()*zoom);
- // ensure that the size we draw is a whole number of pixels in each dimension
- if (low_resolution)
- {
- if (w % low_res_pixel_size) w = (w/low_res_pixel_size+1)*low_res_pixel_size;
- if (h % low_res_pixel_size) h = (h/low_res_pixel_size+1)*low_res_pixel_size;
- }
+ // ensure that the size we draw is at least one pixel in each dimension
+ int min_size = low_resolution ? low_res_pixel_size : 1;
+ if (w < min_size) w = min_size;
+ if (h < min_size) h = min_size;
// Setup the description parameters
desc.set_antialias(1);