gimp r24969 - trunk/plug-ins/print
- From: neo svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r24969 - trunk/plug-ins/print
- Date: Tue, 26 Feb 2008 14:04:04 +0000 (GMT)
Author: neo
Date: Tue Feb 26 14:04:03 2008
New Revision: 24969
URL: http://svn.gnome.org/viewvc/gimp?rev=24969&view=rev
Log:
Allocate a 1 pixel extra border around the preview to avoid redraw
bugs due to rounding errors when changing the paper orientation.
Modified:
trunk/plug-ins/print/print-preview.c
Modified: trunk/plug-ins/print/print-preview.c
==============================================================================
--- trunk/plug-ins/print/print-preview.c (original)
+++ trunk/plug-ins/print/print-preview.c Tue Feb 26 14:04:03 2008
@@ -253,6 +253,7 @@
PrintPreview *preview = PRINT_PREVIEW (widget);
gdouble paper_width;
gdouble paper_height;
+ gint border = GTK_CONTAINER (widget)->border_width + 1;
print_preview_get_page_size (preview, &paper_width, &paper_height);
@@ -269,8 +270,8 @@
requisition->height = MIN (requisition->height, 2 * SIZE_REQUEST);
}
- requisition->width += GTK_CONTAINER (widget)->border_width * 2;
- requisition->height += GTK_CONTAINER (widget)->border_width * 2;
+ requisition->width += 2 * border;
+ requisition->height += 2 * border;
}
static void
@@ -397,6 +398,7 @@
gdouble top_margin;
gdouble bottom_margin;
gdouble scale;
+ gint border = GTK_CONTAINER (widget)->border_width + 1;
print_preview_get_page_size (preview, &paper_width, &paper_height);
print_preview_get_page_margins (preview,
@@ -408,8 +410,8 @@
cr = gdk_cairo_create (widget->window);
cairo_translate (cr,
- widget->allocation.x + GTK_CONTAINER (widget)->border_width,
- widget->allocation.y + GTK_CONTAINER (widget)->border_width);
+ widget->allocation.x + border,
+ widget->allocation.y + border);
cairo_set_line_width (cr, 1.0);
@@ -673,7 +675,7 @@
gdouble paper_height;
gdouble scale_x;
gdouble scale_y;
- gint border = GTK_CONTAINER (widget)->border_width;
+ gint border = GTK_CONTAINER (widget)->border_width + 1;
print_preview_get_page_size (preview, &paper_width, &paper_height);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]