diff options
author | Vincent Sanders <vince@kyllikki.org> | 2017-02-11 13:54:08 +0000 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2017-02-11 13:55:41 +0000 |
commit | 3722ff8d867db506c68e5467bbcdb6012e384fc8 (patch) | |
tree | 451e1a614e64b7e7e87c6273856017d3b81b99e5 /content/handlers/image/nssprite.c | |
parent | 98ccc9fe1836c59f7eff43f45ac2323798ee785a (diff) | |
download | netsurf-3722ff8d867db506c68e5467bbcdb6012e384fc8.tar.gz netsurf-3722ff8d867db506c68e5467bbcdb6012e384fc8.tar.bz2 |
Update all core use of plotters to new API
Diffstat (limited to 'content/handlers/image/nssprite.c')
-rw-r--r-- | content/handlers/image/nssprite.c | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/content/handlers/image/nssprite.c b/content/handlers/image/nssprite.c index c902fc3e2..247574aa4 100644 --- a/content/handlers/image/nssprite.c +++ b/content/handlers/image/nssprite.c @@ -16,9 +16,9 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -/** \file - * Content for image/x-riscos-sprite (librosprite implementation). - * +/** + * \file + * librosprite implementation for content image/x-riscos-sprite */ #include <stdbool.h> @@ -185,19 +185,28 @@ static void nssprite_destroy(struct content *c) * Redraw a CONTENT_SPRITE. */ -static bool nssprite_redraw(struct content *c, struct content_redraw_data *data, - const struct rect *clip, const struct redraw_context *ctx) +static bool +nssprite_redraw(struct content *c, + struct content_redraw_data *data, + const struct rect *clip, + const struct redraw_context *ctx) { nssprite_content *nssprite = (nssprite_content *) c; bitmap_flags_t flags = BITMAPF_NONE; - if (data->repeat_x) + if (data->repeat_x) { flags |= BITMAPF_REPEAT_X; - if (data->repeat_y) + } + if (data->repeat_y) { flags |= BITMAPF_REPEAT_Y; + } - return ctx->plot->bitmap(data->x, data->y, data->width, data->height, - nssprite->bitmap, data->background_colour, flags); + return (ctx->plot->bitmap(ctx, + nssprite->bitmap, + data->x, data->y, + data->width, data->height, + data->background_colour, + flags) == NSERROR_OK); } |