Bug 90106 - Export Diagram PNG has black edges on left and top
Summary: Export Diagram PNG has black edges on left and top
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Umbrello Development Group
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-23 16:46 UTC by Bill Lewis
Modified: 2004-10-28 00:34 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bill Lewis 2004-09-23 16:46:08 UTC
Version:           1.3.0 (using KDE KDE 3.3.0)
Compiler:          gcc (GCC) 3.3.4 20040623 (Gentoo Linux 3.3.4-r1, ssp-3.3.2-2, pie-8.7.6) 
OS:                Linux

If the diagram (Use Case, Activity, State, Collaboration, Sequence, Class) has items "too close" to the top and/or the left edge, then when exporting the diagram there are thick black lines on the top and left edge of the image.

This creates a small dilema as we have many diagrams fairly tight to these two (2) borders too limit printing to one page, however, once exported for inclusion in a document, then the black lines are visible. Thus the diagram needs to be resituated in the middle for export.

Reproducible always, on several workstations with the same versions of KDE and Umbrello.
Comment 1 Modestas Vainius 2004-10-14 00:23:13 UTC
Consider this extract from umlview.cpp:873 (UMLView::getDiagramRect()):
------------------------------------
       }

        // Margin:
        startx -= 24;
        starty -= 20;
        endx += 24;
        endy += 20;

        return QRect(startx, starty,  endx - startx, endy - starty);
}
-------------------------------------------
in case of "startx" < 24 and/or "starty" < 20, the values of these variables will turn negative after decrement. I suppose, this should not happen. As this rect object is later used to define the area in a diagram to be converted into an image, unexpected results are produced. Furthermore, as UMLView::getDiagramRect() is extensively used in the code, this bug may be a cause of other problems.

I'm using Umbrello 1.3.1 and KDE 3.3.0
Comment 2 Jonathan Riddell 2004-10-28 00:34:19 UTC
CVS commit by jriddell: 

Remove margin which was causing problems
BUG:90106


  M +2 -0      umlview.cpp   1.183


--- kdesdk/umbrello/umbrello/umlview.cpp  #1.182:1.183
@@ -885,4 +885,5 @@ QRect UMLView::getDiagramRect() {
         }
 
+/* Margin causes problems of black border around the edge
         // Margin:
         startx -= 24;
@@ -890,4 +891,5 @@ QRect UMLView::getDiagramRect() {
         endx += 24;
         endy += 20;
+*/
 
         return QRect(startx, starty,  endx - startx, endy - starty);