Gitweb links:
...log
http://git.netsurf-browser.org/netsurf.git/shortlog/37b6233fff6dae4ca92a109295b54d84e9e82381
...commit
http://git.netsurf-browser.org/netsurf.git/commit/37b6233fff6dae4ca92a109295b54d84e9e82381
...tree
http://git.netsurf-browser.org/netsurf.git/tree/37b6233fff6dae4ca92a109295b54d84e9e82381
The branch, master has been updated
via 37b6233fff6dae4ca92a109295b54d84e9e82381 (commit)
from 703734c3897f50512603c411b32242ca4f55fde4 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=37b6233fff6dae4ca92a109295b54d84e9e82381
commit 37b6233fff6dae4ca92a109295b54d84e9e82381
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>
RISC OS: Image: Fix EX0 EY0 plot when avoiding Tinct
diff --git a/frontends/riscos/image.c b/frontends/riscos/image.c
index 0bad948..4cced0f 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,
-----------------------------------------------------------------------
Summary of changes:
frontends/riscos/image.c | 26 ++++++++++++++++++++------
1 file changed, 20 insertions(+), 6 deletions(-)
diff --git a/frontends/riscos/image.c b/frontends/riscos/image.c
index 0bad948..4cced0f 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,
--
NetSurf Browser
_______________________________________________
netsurf-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]