1
0
mirror of https://git.code.sf.net/p/zint/code synced 2025-12-21 03:47:07 +00:00

Preview scales to show whole image.

This commit is contained in:
hooper114
2009-04-28 07:22:46 +00:00
parent 8a5b33a9cb
commit d3171b2c31
2 changed files with 11 additions and 6 deletions

View File

@@ -228,7 +228,7 @@ void QZint::render(QPainter & painter, const QRectF & paintRect, AspectRatioMode
qreal gheight=m_zintSymbol->height;
if (m_zintSymbol->symbology == BARCODE_MAXICODE)
{
gheight*=(maxi_width+1);
gheight*=(maxi_width);
gwidth*=(maxi_width+1);
}
@@ -246,7 +246,7 @@ void QZint::render(QPainter & painter, const QRectF & paintRect, AspectRatioMode
break;
case KeepAspectRatio:
if (paintRect.width()-gwidth<paintRect.height()-gheight)
if (paintRect.width()/gwidth<paintRect.height()/gheight)
{
ysf=xsf=(qreal)paintRect.width()/gwidth;
ytr+=(qreal)(paintRect.height()-gheight*ysf)/2;