r9950 vince - in /trunk/netsurf/windows: gui.c localhistory.c plot.c

netsurf at semichrome.net netsurf at semichrome.net
Mon Feb 1 23:59:40 GMT 2010


Author: vince
Date: Mon Feb  1 17:59:40 2010
New Revision: 9950

URL: http://source.netsurf-browser.org?rev=9950&view=rev
Log:
remove all references to defunct vertical offset from plotters

Modified:
    trunk/netsurf/windows/gui.c
    trunk/netsurf/windows/localhistory.c
    trunk/netsurf/windows/plot.c

Modified: trunk/netsurf/windows/gui.c
URL: http://source.netsurf-browser.org/trunk/netsurf/windows/gui.c?rev=9950&r1=9949&r2=9950&view=diff
==============================================================================
--- trunk/netsurf/windows/gui.c (original)
+++ trunk/netsurf/windows/gui.c Mon Feb  1 17:59:40 2010
@@ -1722,13 +1722,6 @@
 	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)

Modified: trunk/netsurf/windows/localhistory.c
URL: http://source.netsurf-browser.org/trunk/netsurf/windows/localhistory.c?rev=9950&r1=9949&r2=9950&view=diff
==============================================================================
--- trunk/netsurf/windows/localhistory.c (original)
+++ trunk/netsurf/windows/localhistory.c Mon Feb  1 17:59:40 2010
@@ -158,15 +158,13 @@
 		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),

Modified: trunk/netsurf/windows/plot.c
URL: http://source.netsurf-browser.org/trunk/netsurf/windows/plot.c?rev=9950&r1=9949&r2=9950&view=diff
==============================================================================
--- trunk/netsurf/windows/plot.c (original)
+++ trunk/netsurf/windows/plot.c Mon Feb  1 17:59:40 2010
@@ -57,9 +57,6 @@
 
 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 @@
 	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 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 @@
 		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 @@
 	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 @@
 	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 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 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 @@
 #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;




More information about the netsurf-commits mailing list