summaryrefslogtreecommitdiff
path: root/image
diff options
context:
space:
mode:
Diffstat (limited to 'image')
-rw-r--r--image/nssprite.c16
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);
}