<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<h3 class="fn">Hi, <br>
</h3>
<p>in UMLView::print(QPrinter *pPrinter, QPainter & pPainter)
there is a wrong border calculation, which is fixed by the
appended patch. <br>
</p>
<p>Some details: In the above mentioned method calculates border
from QPrinters settings <br>
</p>
<p>...<br>
> uint left, right, top, bottom;<br>
QRect paper = pPrinter->paperRect();<br>
QRect page = pPrinter->pageRect();<br>
> top = paper.top() - page.top();<br>
> left = paper.left() - page.left();<br>
bottom = paper.bottom() - page.bottom();<br>
right = paper.right() - page.right();<br>
<br>
</p>
<h3 class="fn">QPrinters doc says about <span class="type"></span></h3>
<h3 class="fn">"<span class="type"><a
href="http://doc.qt.nokia.com/4.7-snapshot/qrect.html">QRect</a></span>
QPrinter::<span class="name">paperRect</span> () const
</h3>
<p>Returns the paper's rectangle; this is usually larger than the <a
href="http://doc.qt.nokia.com/4.7-snapshot/qprinter.html#pageRect">pageRect</a>()."<br>
</p>
<p>this means that in the above mentioned line </p>
<p> top = paper.top() - page.top();</p>
<p>top will be a very high positive value (tested on windows with
msvc) if paper.top() is smaller than page.top() which is usual the
default. <br>
</p>
<p>If there are no objectives, i would commit this patch. <br>
</p>
<p>Regards<br>
Ralf <br>
<br>
</p>
</body>
</html>