diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2011-05-09 08:23:01 +0000 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2011-05-09 08:23:01 +0000 |
commit | 901ef07a95ecbf28395c2e6873fcf9e912803c5c (patch) | |
tree | b45e80832b9ec14b9a0be9d15bfd94deade8951a | |
parent | 41d2df4f5c5635d076bfbe0d0bc7a1e1998d066c (diff) | |
download | netsurf-901ef07a95ecbf28395c2e6873fcf9e912803c5c.tar.gz netsurf-901ef07a95ecbf28395c2e6873fcf9e912803c5c.tar.bz2 |
Untested fix and tile implementation for nssprite.
svn path=/trunk/netsurf/; revision=12329
-rw-r--r-- | image/nssprite.c | 16 |
1 files changed, 12 insertions, 4 deletions
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); } |