Package: libgutenprintui2-1
Version: 4.3.99+cvs20050801-1
Severity: normal
Tags: patch

For images wider than they are tall, if set up Auto orientation in print
settings dialog, set scaling to PPI, and save settings, when settings
are restored the scaling and positioning may be wrong.

To see an example:

- Create a 500 px wide by 100 px high blank image in Gimp
- Choose File->Print...
- Set page size to letter
- Set the orientation to "Auto".
- Set "scale by" to "ppi"
- Scale to largest image size = minimum PPI (probably about 45 PPI depending on
  printer margins)
- Click button to center image horizontally
- Save settings and cancel out of the print dialog.
- Reopen the print dialog
- Settings have change and the scaling is now set to about 60 PPI.
  Also, the x&y offsets are different than they were before, the image
  is in top left corner of the page.

This appears to be because the first call to do_all_updates() in
src/gutenprintui2 calls set_orientation() before the printable_width and
printable_height globals are set.

I don't know if there is a corresponding bug in libgutenprintui1 and/or
the 4.2.7 code.

Below is a diff of a stopgap fix of the problem.  It's an ugly patch, it
just grabs code called later in preview_update() and places it earlier
in the control flow.  If someone actually understands gimpprintui2 and
wants to do this right, that would probably be helpful...

diff -ru gutenprint-4.3.99+cvs20050801.orig/src/gutenprintui2/panel.c 
gutenprint-4.3.99+cvs20050801/src/gutenprintui2/panel.c
--- gutenprint-4.3.99+cvs20050801.orig/src/gutenprintui2/panel.c        
2005-06-29 22:38:16.000000000 -0400
+++ gutenprint-4.3.99+cvs20050801/src/gutenprintui2/panel.c     2005-08-06 
00:46:15.000000000 -0400
@@ -2630,6 +2630,12 @@
 gint
 stpui_compute_orientation(void)
 {
+  /* if this is called before preview_update() -- which happens on startup --
+   * then printable image area is not yet set */
+  stp_get_imageable_area(pv->v, &left, &right, &bottom, &top);
+  printable_width  = right - left;
+  printable_height = bottom - top;
+
   if (auto_paper_size ||
       (printable_width >= printable_height &&
        image_true_width >= image_true_height) ||

-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable'), (101, 
'experimental')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.12
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)

Versions of packages libgutenprintui2-1 depends on:
ii  libatk1.0-0         1.10.1-2             The ATK accessibility toolkit
ii  libc6               2.3.2.ds1-22         GNU C Library: Shared libraries an
ii  libglib2.0-0        2.6.5-1              The GLib library of C routines
ii  libgtk2.0-0         2.6.8-1              The GTK+ graphical user interface 
ii  libgutenprint2      4.3.99+cvs20050801-1 runtime for the Gutenprint printer
ii  libpango1.0-0       1.8.2-1              Layout and rendering of internatio

Versions of packages libgutenprintui2-1 recommends:
ii  gutenprint-locales  4.3.99+cvs20050801-1 locale data files for Gutenprint

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to