22#include <oslib/colourtrans.h>
23#include <oslib/osspriteop.h>
51 int req_width,
int req_height,
int width,
int height,
52 colour background_colour,
bool repeatx,
bool repeaty,
55 _kernel_oserror *error;
78 NSLOG(netsurf, INFO,
"xtinct_plotscaled%s: 0x%x: %s",
79 (alpha ?
"alpha" :
""), error->errnum, error->errmess);
104 osspriteop_trans_tab *table;
107 error = xcolourtrans_generate_table_for_sprite(
108 osspriteop_UNSPECIFIED, header,
110 colourtrans_CURRENT_PALETTE,
111 0, colourtrans_GIVEN_SPRITE, 0, 0, &size);
114 "xcolourtrans_generate_table_for_sprite: 0x%x: %s",
120 table = calloc(size,
sizeof(
char));
122 NSLOG(netsurf, INFO,
"malloc failed");
127 error = xcolourtrans_generate_table_for_sprite(
128 osspriteop_UNSPECIFIED, header,
130 colourtrans_CURRENT_PALETTE,
131 table, colourtrans_GIVEN_SPRITE, 0, 0, 0);
134 "xcolourtrans_generate_table_for_sprite: 0x%x: %s",
147 error = xosspriteop_plot_tiled_sprite(osspriteop_PTR,
148 osspriteop_UNSPECIFIED, header, x, y,
149 osspriteop_USE_MASK, &f, table);
151 error = xosspriteop_put_sprite_scaled(osspriteop_PTR,
152 osspriteop_UNSPECIFIED, header, x, y,
153 osspriteop_USE_MASK, &f, table);
157 "xosspriteop_put_sprite_scaled: 0x%x: %s",
180 osspriteop_area *area,
185 osspriteop_header *sprite = (osspriteop_header *)(area + 1);
216 bool tinct_avoid =
false;
223 osspriteop_id header = (osspriteop_id)
224 ((
char*) area + area->first);
254 req_width = (req_width / 2) * (4 >> xeig);
255 req_height = (req_height / 2) * (4 >> yeig);
262 req_width, req_height,
265 repeatx, repeaty,
true,
271 req_width, req_height,
274 repeatx, repeaty,
false,
unsigned int tinct_options[]
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.
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.
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.
static void image__override_sprite_mode(osspriteop_area *area, image_type type, os_mode old, os_mode new)
Override a sprite's mode.
@ IMAGE_PLOT_TINCT_OPAQUE
#define NSLOG(catname, level, logmsg, args...)
nserror ro_warn_user(const char *warning, const char *detail)
Display a warning for a serious problem (eg memory exhaustion).
bool os_alpha_sprite_supported
Tinct SWI numbers and flags for version 0.11.
#define tinct_FILL_HORIZONTALLY
#define Tinct_PlotScaledAlpha
Plots a scaled alpha-blended sprite at the specified coordinates.
#define tinct_FILL_VERTICALLY
#define tinct_USE_OS_SPRITE_OP
#define tinct_SPRITE_MODE
#define Tinct_PlotScaled
Plots a scaled sprite at the specified coordinates with a constant 0xff value for the alpha channel,...
#define alpha_SPRITE_MODE
#define tinct_BACKGROUND_SHIFT
uint32_t colour
Colour type: XBGR.
Option reading and saving interface.
#define nsoption_int(OPTION)
Get the value of an integer option.
bool ro_gui_wimp_read_eig_factors(os_mode mode, int *xeig, int *yeig)
Reads a modes EIG factors.
General RISC OS WIMP/OS library functions (interface).