summaryrefslogtreecommitdiff
path: root/windows
diff options
context:
space:
mode:
Diffstat (limited to 'windows')
-rw-r--r--windows/gui.c7
-rw-r--r--windows/localhistory.c4
-rw-r--r--windows/plot.c20
3 files changed, 4 insertions, 27 deletions
diff --git a/windows/gui.c b/windows/gui.c
index 8df950b01..73e6b72fa 100644
--- a/windows/gui.c
+++ b/windows/gui.c
@@ -1722,13 +1722,6 @@ RECT *gui_window_clip_rect(struct gui_window *w)
return &(w->clip);
}
-int gui_window_voffset(struct gui_window *w)
-{
- if (w == NULL)
- return 0;
- return 0;
-}
-
int gui_window_width(struct gui_window *w)
{
if (w == NULL)
diff --git a/windows/localhistory.c b/windows/localhistory.c
index 09d6e4f4c..aa80aeae3 100644
--- a/windows/localhistory.c
+++ b/windows/localhistory.c
@@ -158,15 +158,13 @@ LRESULT CALLBACK nsws_localhistory_event_callback(HWND hwnd, UINT msg,
break;
case WM_MOVE: {
RECT r, rmain;
- int voffset;
if (w != NULL) {
current_gui = w;
current_hwnd = gui_window_main_window(w);
- voffset = gui_window_voffset(w);
GetWindowRect(hwnd, &r);
GetWindowRect(current_hwnd, &rmain);
gui_window_redraw(w,
- MIN(r.top - rmain.top - voffset, 0),
+ MIN(r.top - rmain.top , 0),
MIN(r.left - rmain.left, 0),
gui_window_height(w) -
MIN(rmain.bottom - r.bottom, 0),
diff --git a/windows/plot.c b/windows/plot.c
index cef40dbc5..8fdb6d22b 100644
--- a/windows/plot.c
+++ b/windows/plot.c
@@ -57,9 +57,6 @@ static RECT localhistory_clip;
static bool clip(int x0, int y0, int x1, int y1)
{
- int voffset = (thumbnail ? 0 : gui_window_voffset(current_gui));
- y0 += voffset;
- y1 += voffset;
#if NSWS_PLOT_DEBUG
LOG(("clip %d,%d to %d,%d thumbnail %d", x0, y0, x1, y1, thumbnail));
@@ -68,10 +65,10 @@ static bool clip(int x0, int y0, int x1, int y1)
if (clip == NULL)
clip = &localhistory_clip;
x0 = MAX(x0, 0);
- y0 = MAX(y0, voffset);
+ y0 = MAX(y0, 0);
if (!((current_gui == NULL) || (thumbnail))) {
x1 = MIN(x1, gui_window_width(current_gui));
- y1 = MIN(y1, gui_window_height(current_gui) + voffset);
+ y1 = MIN(y1, gui_window_height(current_gui));
}
clip->left = x0;
clip->top = y0 ;
@@ -83,8 +80,6 @@ static bool clip(int x0, int y0, int x1, int y1)
static bool line(int x0, int y0, int x1, int y1, const plot_style_t *style)
{
- y0 += (thumbnail ? 0 : gui_window_voffset(current_gui));
- y1 += (thumbnail ? 0 : gui_window_voffset(current_gui));
#if NSWS_PLOT_DEBUG
LOG(("ligne from %d,%d to %d,%d thumbnail %d", x0, y0, x1, y1,
thumbnail));
@@ -159,8 +154,6 @@ static bool rectangle(int x0, int y0, int x1, int y1, const plot_style_t
y1 = MIN(y1, gui_window_height(current_gui));
}
- y0 += (thumbnail ? 0 : gui_window_voffset(current_gui));
- y1 += (thumbnail ? 0 : gui_window_voffset(current_gui));
#if NSWS_PLOT_DEBUG
LOG(("rectangle from %d,%d to %d,%d thumbnail %d", x0, y0, x1, y1,
thumbnail));
@@ -306,9 +299,7 @@ static bool polygon(const int *p, unsigned int n, const plot_style_t *style)
SetPolyFillMode(hdc, WINDING);
for (i = 0; i < n; i++) {
points[i].x = (long) p[2 * i];
- points[i].y = (long) (p[2 * i + 1]
- + (thumbnail ? 0 :
- gui_window_voffset(current_gui)));
+ points[i].y = (long) p[2 * i + 1];
#if NSWS_PLOT_DEBUG
printf ("%ld,%ld ", points[i].x, points[i].y);
@@ -370,7 +361,6 @@ static bool text(int x, int y, const char *text, size_t length,
fontbak = (HFONT) SelectObject(hdc, font);
GetTextExtentPoint(hdc, text, length, &s);
- y += (thumbnail ? 0 : gui_window_voffset(current_gui));
r.left = x;
r.top = y - (3 * s.cy) / 4;
r.right = x + s.cx;
@@ -407,7 +397,6 @@ static bool text(int x, int y, const char *text, size_t length,
static bool disc(int x, int y, int radius, const plot_style_t *style)
{
- y += (thumbnail ? 0 : gui_window_voffset(current_gui));
#if NSWS_PLOT_DEBUG
LOG(("disc at %d,%d radius %d thumbnail %d", x, y, radius, thumbnail));
#endif
@@ -492,7 +481,6 @@ static bool disc(int x, int y, int radius, const plot_style_t *style)
static bool arc(int x, int y, int radius, int angle1, int angle2,
const plot_style_t *style)
{
- y += (thumbnail ? 0 : gui_window_voffset(current_gui));
#if NSWS_PLOT_DEBUG
LOG(("arc centre %d,%d radius %d from %d to %d", x, y, radius,
angle1, angle2));
@@ -613,8 +601,6 @@ static bool bitmap(int x, int y, int width, int height,
#endif
if (bitmap == NULL)
return false;
- int voffset = (thumbnail ? 0 : gui_window_voffset(current_gui));
- y += voffset;
HDC hdc = doublebuffering ? bufferdc : GetDC(current_hwnd);
if (hdc == NULL) {
return false;