From: Robert L K. <rl...@al...> - 2000-05-12 23:18:15
|
Date: Sat, 13 May 2000 00:05:06 +0100 From: Thorsten Schnier <tho...@sc...> I had a look at the positioning code in gtk_main_window.c and found a few problems. The calculation of the values for "right" and "bottom" was wrong, and the non-printable areas got ignored. Could you fix this in gimp_main_window.c also? Mitch or Steve, could you check this out? And I've added a second frame in the preview which shows the edges of the printable area inside the paper. That sounds like a good idea. Unfortunately, though I think the values calculated are correct, the print does not quite end up at the correct place, it seems too low by about 3mm and left by about 1mm (on my 440, with 360dpi setting). But there was some discussion about problems with the softweave code positioning, so I guess that might be the reason. I'm in the middle of hacking this code extensively, so that for a lot of printers (in softweave mode, at any rate) it should be possible to print very close to the edges of the paper. There will be some quality degradation near the top and the bottom (it won't be able to do the full interleaving that it does in the middle of the page, so there will be some bandin). It won't fix the horizontal positioning problem, although in my experience it's hard to get the paper in EXACTLY the right spot from time to time. I've changed a few variable names to make the distinction between printable area and paper area more clear; I've left vars.left and vars.top relative to the edges of the printable area (this is correct, isn't it? Meaning 0 / 0 means the image is located against the top left of the printable area? ) Just make sure it doesn't break anything that relies on it. I don't quite understand how the plugin decides between gimp_main_window and gtk_main_window, I've patched only the one that it is using in my case, but if required the other one should be straightforward. It registers twice with the Gimp, and picks gimp or gtk toolkits based upon which one is called. There is some code in there that prevents people from moving the image (partially) outside the printable area, I wonder if this is desirable / required? Would it make more sense to allow partial clipping ? Would the print code cope with negative offsets? There was some discussion about this not too long ago. I'm not too keen on it. I think that if you want to clip output, it should be done at the application level so you know exactly what's going to get printed out. -- Robert Krawitz <rl...@al...> http://www.tiac.net/users/rlk/ Tall Clubs International -- http://www.tall.org/ or 1-888-IM-TALL-2 Member of the League for Programming Freedom -- mail lp...@uu... Project lead for The Gimp Print -- http://gimp-print.sourceforge.net "Linux doesn't dictate how I work, I dictate how Linux works." --Eric Crampton |