summaryrefslogtreecommitdiff
path: root/image/gif.c
diff options
context:
space:
mode:
Diffstat (limited to 'image/gif.c')
-rw-r--r--image/gif.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/image/gif.c b/image/gif.c
index 433f7d823..e16275448 100644
--- a/image/gif.c
+++ b/image/gif.c
@@ -160,7 +160,7 @@ bool nsgif_redraw(struct content *c, int x, int y,
return false;
c->bitmap = c->data.gif.gif->frame_image;
return plot.bitmap(x, y, width, height, c->bitmap,
- background_colour, c);
+ background_colour, BITMAPF_NONE);
}
@@ -170,12 +170,20 @@ bool nsgif_redraw_tiled(struct content *c, int x, int y,
float scale, colour background_colour,
bool repeat_x, bool repeat_y)
{
+ bitmap_flags_t flags = BITMAPF_NONE;
+
if (c->data.gif.current_frame != c->data.gif.gif->decoded_frame)
if (nsgif_get_frame(c) != GIF_OK)
return false;
+
c->bitmap = c->data.gif.gif->frame_image;
- return plot.bitmap_tile(x, y, width, height, c->bitmap,
- background_colour, repeat_x, repeat_y, c);
+
+ if (repeat_x)
+ flags |= BITMAPF_REPEAT_X;
+ if (repeat_y)
+ flags |= BITMAPF_REPEAT_Y;
+
+ return plot.bitmap(x, y, width, height, c->bitmap, background_colour, flags);
}