Version: 1.4.1 (using KDE KDE 3.4.1) Installed from: Fedora RPMs OS: Linux An Encapsulated Postscript (EPS) diagram export in Umbrello does not look the same as on the screen, with respect to element alignment. For instance, make a class diagram, and put a single class named Agent on it. Insert a dependence of Agent upon itself. On the screen, the line denoting dependence is a U-formed zig-zag, turning at right angles (90 degrees) at each corner point. Export the diagram to EPS and look at the output. The dependence line is a zig-zag, but the angles are not 90 degrees. This error repeats throughout Umbrello EPS exports, making for quite ugly diagrams. If you make a PNG export, you don't see this problem. Compare: http://cobalt.et.tudelft.nl/~filip/files/bug-reports/umbrello/meet-uml-class.png http://cobalt.et.tudelft.nl/~filip/files/bug-reports/umbrello/meet-uml-class.eps
Created attachment 12374 [details] PATCH Change print resolution for eps files to match those of png etc... This fix is trivial, it switches to screen resolution instead of printer resolution when saving as eps (and vice versa for other 'print' formats). It seems not to break printing the sheet or saving to other formats... The resulting eps file has the same layout as the screen (WYSIWIG). Peter
SVN commit 454055 by okellogg: BUG:111088 - From Peter Soetens 2005-08-25 23:08 > This fix is trivial, it switches to screen resolution instead of printer > resolution when saving as eps (and vice versa for other 'print' formats). > It seems not to break printing the sheet or saving to other formats... > The resulting eps file has the same layout as the screen (WYSIWIG). M +1 -1 ChangeLog M +1 -1 umbrello/umlview.cpp --- branches/KDE/3.5/kdesdk/umbrello/ChangeLog #454054:454055 @@ -10,7 +10,7 @@ * Bugs fixed / wishes implemented (see http://bugs.kde.org) 57588 58809 66461 67719 72016 79433 87252 88117 97162 105564 -108223 109591 109636 110216 110231 110379 111470 111502 +108223 109591 109636 110216 110231 110379 111088 111470 111502 Version 1.4.2 (maintenance release) --- branches/KDE/3.5/kdesdk/umbrello/umbrello/umlview.cpp #454054:454055 @@ -1412,7 +1412,7 @@ // of the printer (which should be 72dpi here) QPrinter *printer; - if (isEPS == true) + if (isEPS == false) { printer = new QPrinter(QPrinter::PrinterResolution); } else {
The proposed patch is not perfect and the original bug may need an alternate way of fixing. The remaining problem with this patch is that the bounding box of the EPS is too large (wrongly calculated, it takes the screen viewport size !?) thus the drawing is mostly somewhere in the left top corner. Don't have enough XP with QPainter/QPrinter to see how to properly fix it. I propose we look at other KDE projects which export EPS from figures (there are lots). The fundamental problem though is that lines/widget dimensions are 'stored' in pixels, while fonts in dpi. Generating a drawing on another resolution (ie printer, eps) than the screen resolution skews font-widget metrics, hence cause this bug report. The patch above fixed that by rendering the EPS at screen resolution.
I just ran a recent svn checkout and exported to EPS. It seems that now, I'm getting the proper print resolution for EPS diagrams again, and the diagram edges aren't all screwed up like they were before! Very nice!