Z = 1.0;
if (GD_drawing(g)->size.x > 0) { /* graph size was given by user... */
P2PF(GD_drawing(g)->size, size);
- if ((size.x < sz.x) || (size.y < sz.y) /* drawing is too big... */
+ if ((size.x < sz.x) || (size.y < sz.y) /* drawing is too big (in either axi) ... */
|| ((GD_drawing(g)->filled) /* or ratio=filled requested and ... */
- && ((size.x > sz.x) || (size.y > sz.y)))) /* drawing is too small... */
+ && (size.x > sz.x) && (size.y > sz.y))) /* drawing is too small (in both axis) ... */
Z = MIN(size.x/sz.x, size.y/sz.y);
}