NetSurf
|
#include <stdbool.h>
#include <swis.h>
#include <stdlib.h>
#include <oslib/colourtrans.h>
#include <oslib/osspriteop.h>
#include "utils/nsoption.h"
#include "utils/log.h"
#include "riscos/image.h"
#include "riscos/gui.h"
#include "riscos/wimp.h"
#include "riscos/tinct.h"
Go to the source code of this file.
Functions | |
static bool | image_redraw_tinct (osspriteop_id header, int x, int y, int req_width, int req_height, int width, int height, colour background_colour, bool repeatx, bool repeaty, bool alpha, unsigned int tinct_options) |
Plot an image at the given coordinates using tinct. More... | |
static bool | image_redraw_os (osspriteop_id header, int x, int y, int req_width, int req_height, int width, int height, bool tile) |
Plot an image at the given coordinates using os_spriteop. More... | |
static void | image__override_sprite_mode (osspriteop_area *area, image_type type, os_mode old, os_mode new) |
Override a sprite's mode. More... | |
bool | image_redraw (osspriteop_area *area, int x, int y, int req_width, int req_height, int width, int height, colour background_colour, bool repeatx, bool repeaty, bool background, image_type type) |
Plot an image at the given coordinates using the method specified. More... | |
|
inlinestatic |
Override a sprite's mode.
Only replaces mode if existing mode matches old.
[in] | area | The sprite area containing the sprite. |
[in] | type | Requested plot mode. |
[in] | old | Existing sprite mode to check for. |
[in] | new | Sprite mode to set if existing mode is expected. |
Definition at line 179 of file image.c.
References IMAGE_PLOT_TINCT_ALPHA, and type.
Referenced by image_redraw().
bool image_redraw | ( | osspriteop_area * | area, |
int | x, | ||
int | y, | ||
int | req_width, | ||
int | req_height, | ||
int | width, | ||
int | height, | ||
colour | background_colour, | ||
bool | repeatx, | ||
bool | repeaty, | ||
bool | background, | ||
image_type | type | ||
) |
Plot an image at the given coordinates using the method specified.
area | The sprite area containing the sprite |
x | Left edge of sprite |
y | Top edge of sprite |
req_width | The requested width of the sprite |
req_height | The requested height of the sprite |
width | The actual width of the sprite |
height | The actual height of the sprite |
background_colour | The background colour to blend to |
repeatx | Repeat the image in the x direction |
repeaty | Repeat the image in the y direction |
background | Use background image settings (otherwise foreground) |
type | The plot method to use |
Definition at line 209 of file image.c.
References alpha_SPRITE_MODE, height, image__override_sprite_mode(), IMAGE_PLOT_OS, IMAGE_PLOT_TINCT_ALPHA, IMAGE_PLOT_TINCT_OPAQUE, image_redraw_os(), image_redraw_tinct(), nsoption_int, os_alpha_sprite_supported, ro_gui_wimp_read_eig_factors(), tinct_options, tinct_SPRITE_MODE, tinct_USE_OS_SPRITE_OP, type, and width.
Referenced by ro_plot_bitmap().
|
static |
Plot an image at the given coordinates using os_spriteop.
header | The sprite header |
x | Left edge of sprite |
y | Top edge of sprite |
req_width | The requested width of the sprite |
req_height | The requested height of the sprite |
width | The actual width of the sprite |
height | The actual height of the sprite |
tile | Whether to tile the sprite |
Definition at line 99 of file image.c.
References height, NSLOG, ro_warn_user(), and width.
Referenced by image_redraw().
|
static |
Plot an image at the given coordinates using tinct.
header | The sprite header |
x | Left edge of sprite |
y | Top edge of sprite |
req_width | The requested width of the sprite |
req_height | The requested height of the sprite |
width | The actual width of the sprite |
height | The actual height of the sprite |
background_colour | The background colour to blend to |
repeatx | Repeat the image in the x direction |
repeaty | Repeat the image in the y direction |
alpha | Use the alpha channel |
tinct_options | The base option set to use |
Definition at line 50 of file image.c.
References NSLOG, print_active, tinct_BACKGROUND_SHIFT, tinct_FILL_HORIZONTALLY, tinct_FILL_VERTICALLY, tinct_options, Tinct_PlotScaled, Tinct_PlotScaledAlpha, and tinct_USE_OS_SPRITE_OP.
Referenced by image_redraw().