summaryrefslogtreecommitdiff
path: root/source/html
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2017-03-20 11:28:13 +0100
committerTor Andersson <tor.andersson@artifex.com>2017-03-20 11:28:30 +0100
commit4f37198eeb77ca94a7795bb66f42a8aa1ac8e4be (patch)
tree02fc90b4e49e75f7275392259103191834ceba19 /source/html
parent5f2a92853bd770e1ae00276ce43181fffc466841 (diff)
downloadmupdf-4f37198eeb77ca94a7795bb66f42a8aa1ac8e4be.tar.xz
epub: Fix disappearing images bug.
The bug was introduced in commit ad09b038 where we adjust the y coordinate in draw calls instead of using the top level matrix so that high level output devices get reasonable page coordinates for objects. We forgot to adjust the y coordinate for images.
Diffstat (limited to 'source/html')
-rw-r--r--source/html/html-layout.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/html/html-layout.c b/source/html/html-layout.c
index 78259ebb..8520c782 100644
--- a/source/html/html-layout.c
+++ b/source/html/html-layout.c
@@ -1620,7 +1620,7 @@ static void draw_flow_box(fz_context *ctx, fz_html_box *box, float page_top, flo
if (style->visibility == V_VISIBLE)
{
fz_matrix local_ctm = *ctm;
- fz_pre_translate(&local_ctm, node->x, node->y);
+ fz_pre_translate(&local_ctm, node->x, node->y - page_top);
fz_pre_scale(&local_ctm, node->w, node->h);
fz_fill_image(ctx, dev, node->content.image, &local_ctm, 1);
}