r4695 adamblokus - in /branches/adamblokus/netsurf: desktop/print.c gtk/gtk_print.c

netsurf at semichrome.net netsurf at semichrome.net
Fri Jul 18 18:59:24 BST 2008


Author: adamblokus
Date: Fri Jul 18 12:59:24 2008
New Revision: 4695

URL: http://source.netsurf-browser.org?rev=4695&view=rev
Log:
- fixed uncommented line from the previous commit
- fixed bug with scale bigger than 1.0 (incorretly clipped page)

Modified:
    branches/adamblokus/netsurf/desktop/print.c
    branches/adamblokus/netsurf/gtk/gtk_print.c

Modified: branches/adamblokus/netsurf/desktop/print.c
URL: http://source.netsurf-browser.org/branches/adamblokus/netsurf/desktop/print.c?rev=4695&r1=4694&r2=4695&view=diff
==============================================================================
--- branches/adamblokus/netsurf/desktop/print.c (original)
+++ branches/adamblokus/netsurf/desktop/print.c Fri Jul 18 12:59:24 2008
@@ -126,8 +126,8 @@
 			0,0,
 			0,
 			0,
-			page_content_width,
-			page_content_height,
+			page_content_width * settings->scale,
+   			page_content_height  * settings->scale,
 			settings->scale, 0xffffff))
 		return false;
 	done_height += page_content_height - text_margin_height;

Modified: branches/adamblokus/netsurf/gtk/gtk_print.c
URL: http://source.netsurf-browser.org/branches/adamblokus/netsurf/gtk/gtk_print.c?rev=4695&r1=4694&r2=4695&view=diff
==============================================================================
--- branches/adamblokus/netsurf/gtk/gtk_print.c (original)
+++ branches/adamblokus/netsurf/gtk/gtk_print.c Fri Jul 18 12:59:24 2008
@@ -218,7 +218,9 @@
 bool nsgtk_print_plot_clip(int clip_x0, int clip_y0,
 		     int clip_x1, int clip_y1)
 {
-
+	LOG(("Clipping. x0: %i ;\t y0: %i ;\t x1: %i ;\t y1: %i",
+			clip_x0,clip_y0,clip_x1,clip_y1));	
+	
 	/*Normalize cllipping area - to prevent overflows*/
 	clip_x0 = min(max(clip_x0, 0), settings->page_width);
 	clip_y0 = min(max(clip_y0, 0), settings->page_height);
@@ -235,7 +237,7 @@
 	cliprect.y = clip_y0;
 	cliprect.width = clip_x1 - clip_x0;
 	cliprect.height = clip_y1 - clip_y0;
-	gdk_gc_set_clip_rectangle(gtk_print_current_gc, &cliprect);
+//	gdk_gc_set_clip_rectangle(gtk_print_current_gc, &cliprect);
 	return true;
 	
 }
@@ -518,7 +520,7 @@
 	settings->margins[MARGINRIGHT] = 0;
 	settings->page_width = gtk_print_context_get_width(context);
 	settings->page_height = gtk_print_context_get_height(context);
-	settings->scale = 0.7;
+	settings->scale = 1.0;
 	settings->font_func = &nsfont;
 	
 	print_set_up(content_to_print, &gtk_printer, settings, &height_to_print);




More information about the netsurf-commits mailing list