From 901ef07a95ecbf28395c2e6873fcf9e912803c5c Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Mon, 9 May 2011 08:23:01 +0000 Subject: Untested fix and tile implementation for nssprite. svn path=/trunk/netsurf/; revision=12329 --- image/nssprite.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'image') diff --git a/image/nssprite.c b/image/nssprite.c index 961188c84..670764ab7 100644 --- a/image/nssprite.c +++ b/image/nssprite.c @@ -52,7 +52,8 @@ static bool nssprite_convert(struct content *c); static void nssprite_destroy(struct content *c); static bool nssprite_redraw(struct content *c, int x, int y, int width, int height, const struct rect *clip, - float scale, colour background_colour); + float scale, colour background_colour, + bool repeat_x, bool repeat_y); static nserror nssprite_clone(const struct content *old, struct content **newc); static content_type nssprite_content_type(lwc_string *mime_type); @@ -82,7 +83,6 @@ static const content_handler nssprite_content_handler = { nssprite_redraw, NULL, NULL, - NULL, nssprite_clone, NULL, nssprite_content_type, @@ -250,10 +250,18 @@ void nssprite_destroy(struct content *c) bool nssprite_redraw(struct content *c, int x, int y, int width, int height, const struct rect *clip, - float scale, colour background_colour) + float scale, colour background_colour, + bool repeat_x, bool repeat_y) { + bitmap_flags_t flags = BITMAPF_NONE; + + 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, BITMAPF_NONE); + c->bitmap, background_colour, flags); } -- cgit v1.2.3