From 6cbec9d66c457fb5198219cceb46207efde86992 Mon Sep 17 00:00:00 2001 From: NicJA Date: Wed, 9 Oct 2013 04:30:30 +0000 Subject: [PATCH] use consistant co-ords when calculating the offsets git-svn-id: https://svn.aros.org/svn/aros/trunk/AROS@48272 fb15a70f-31f2-0310-bbcc-cdcc74a49acc --- workbench/c/Decoration/drawfuncs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/workbench/c/Decoration/drawfuncs.c b/workbench/c/Decoration/drawfuncs.c index 2e48f4fa82..de1cce68d1 100644 --- a/workbench/c/Decoration/drawfuncs.c +++ b/workbench/c/Decoration/drawfuncs.c @@ -1107,10 +1107,10 @@ AROS_UFH3(void, RectShadeFunc, if (msg->MinX == msg->MaxX) { - x = msg->MinX % data->ni->w; + x = msg->OffsetX % data->ni->w; for (py = msg->MinY; py < (msg->MaxY + 1); py++) { - y = (py - offy) % data->ni->h; + y = (py + msg->OffsetY - msg->MinY - offy) % data->ni->h; color = CalcShade(data->ni->data[x + y * data->ni->w], data->fact); if (bm_handle) @@ -1131,9 +1131,9 @@ AROS_UFH3(void, RectShadeFunc, } else { - y = (msg->MinY - offy) % data->ni->h; + y = (msg->OffsetY - offy) % data->ni->h; for (px = msg->MinX; px < (msg->MaxX + 1); px++) { - x = px % data->ni->h; + x = (px + msg->OffsetX - msg->MinX) % data->ni->h; color = CalcShade(data->ni->data[x + y * data->ni->w], data->fact); if (bm_handle) -- 2.11.4.GIT