summaryrefslogtreecommitdiff
path: root/frontends
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2022-08-25 22:30:36 +0100
committerMichael Drake <tlsa@netsurf-browser.org>2022-08-25 22:30:36 +0100
commit37b6233fff6dae4ca92a109295b54d84e9e82381 (patch)
tree63cba6ff9b922b828cbf0236c7575cfdebf5e940 /frontends
parent703734c3897f50512603c411b32242ca4f55fde4 (diff)
downloadnetsurf-37b6233fff6dae4ca92a109295b54d84e9e82381.tar.gz
netsurf-37b6233fff6dae4ca92a109295b54d84e9e82381.tar.bz2
RISC OS: Image: Fix EX0 EY0 plot when avoiding Tinct
Diffstat (limited to 'frontends')
-rw-r--r--frontends/riscos/image.c26
1 files changed, 20 insertions, 6 deletions
diff --git a/frontends/riscos/image.c b/frontends/riscos/image.c
index 0bad94810..4cced0f8a 100644
--- a/frontends/riscos/image.c
+++ b/frontends/riscos/image.c
@@ -27,6 +27,7 @@
#include "riscos/image.h"
#include "riscos/gui.h"
+#include "riscos/wimp.h"
#include "riscos/tinct.h"
/**
@@ -65,11 +66,11 @@ static bool image_redraw_tinct(osspriteop_id header, int x, int y,
if (alpha) {
error = _swix(Tinct_PlotScaledAlpha, _INR(2,7),
- header, x, y - req_height,
+ header, x, y,
req_width, req_height, tinct_options);
} else {
error = _swix(Tinct_PlotScaled, _INR(2,7),
- header, x, y - req_height,
+ header, x, y,
req_width, req_height, tinct_options);
}
@@ -144,13 +145,11 @@ static bool image_redraw_os(osspriteop_id header, int x, int y, int req_width,
if (tile) {
error = xosspriteop_plot_tiled_sprite(osspriteop_PTR,
- osspriteop_UNSPECIFIED, header,
- x, (int)(y - req_height),
+ osspriteop_UNSPECIFIED, header, x, y,
osspriteop_USE_MASK, &f, table);
} else {
error = xosspriteop_put_sprite_scaled(osspriteop_PTR,
- osspriteop_UNSPECIFIED, header,
- x, (int)(y - req_height),
+ osspriteop_UNSPECIFIED, header, x, y,
osspriteop_USE_MASK, &f, table);
}
if (error) {
@@ -220,10 +219,13 @@ bool image_redraw(osspriteop_area *area, int x, int y, int req_width,
osspriteop_id header = (osspriteop_id)
((char*) area + area->first);
+
req_width *= 2;
req_height *= 2;
width *= 2;
height *= 2;
+ y -= req_height;
+
tinct_options = background ? nsoption_int(plot_bg_quality) :
nsoption_int(plot_fg_quality);
@@ -239,6 +241,18 @@ bool image_redraw(osspriteop_area *area, int x, int y, int req_width,
}
}
+ if (tinct_avoid) {
+ int xeig;
+ int yeig;
+
+ if (ro_gui_wimp_read_eig_factors(os_CURRENT_MODE,
+ &xeig, &yeig)) {
+
+ req_width = (req_width / 2) * (4 >> xeig);
+ req_height = (req_height / 2) * (4 >> yeig);
+ }
+ }
+
switch (type) {
case IMAGE_PLOT_TINCT_ALPHA:
res = image_redraw_tinct(header, x, y,