diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2015-05-06 15:07:20 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2015-05-06 15:07:20 +0200 |
commit | b59d73634725a939175fd0e98a6f86bd6ed0d570 (patch) | |
tree | d6e56c3d05411b4daae7ea2df4dbcf9ed78cbd9c /source/html/html-layout.c | |
parent | 9fe8e91556693c90cdb83932f130ceefc518539b (diff) | |
download | mupdf-b59d73634725a939175fd0e98a6f86bd6ed0d570.tar.xz |
epub: Add 'auto' as a special number value.
Diffstat (limited to 'source/html/html-layout.c')
-rw-r--r-- | source/html/html-layout.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/html/html-layout.c b/source/html/html-layout.c index 39163c00..757289f9 100644 --- a/source/html/html-layout.c +++ b/source/html/html-layout.c @@ -369,15 +369,15 @@ static void generate_boxes(fz_context *ctx, fz_html_font_set *set, fz_archive *z } } -static void measure_image(fz_context *ctx, fz_html_flow *node, float w, float h) +static void measure_image(fz_context *ctx, fz_html_flow *node, float max_w, float max_h) { float xs = 1, ys = 1, s = 1; node->x = 0; node->y = 0; - if (node->image->w > w) - xs = w / node->image->w; - if (node->image->h > h) - ys = h / node->image->h; + if (node->image->w > max_w) + xs = max_w / node->image->w; + if (node->image->h > max_h) + ys = max_h / node->image->h; s = fz_min(xs, ys); node->w = node->image->w * s; node->h = node->image->h * s; |