From 4f37198eeb77ca94a7795bb66f42a8aa1ac8e4be Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Mon, 20 Mar 2017 11:28:13 +0100 Subject: 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. --- source/html/html-layout.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source') 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); } -- cgit v1.2.3