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

View File

@ -223,10 +223,6 @@ p, li { white-space: pre-wrap; }
</item> </item>
</layout> </layout>
</widget> </widget>
<zorder>txtComposite</zorder>
<zorder>lblComposite</zorder>
<zorder>layoutWidget</zorder>
<zorder>grpMaxiCode</zorder>
</widget> </widget>
<widget class="QGroupBox" name="grpMaxiCode" > <widget class="QGroupBox" name="grpMaxiCode" >
<property name="geometry" > <property name="geometry" >
@ -287,6 +283,9 @@ p, li { white-space: pre-wrap; }
</item> </item>
</widget> </widget>
<widget class="QLabel" name="lblMaxiPrimary" > <widget class="QLabel" name="lblMaxiPrimary" >
<property name="enabled" >
<bool>false</bool>
</property>
<property name="geometry" > <property name="geometry" >
<rect> <rect>
<x>9</x> <x>9</x>
@ -300,6 +299,9 @@ p, li { white-space: pre-wrap; }
</property> </property>
</widget> </widget>
<widget class="QLineEdit" name="txtMaxiPrimary" > <widget class="QLineEdit" name="txtMaxiPrimary" >
<property name="enabled" >
<bool>false</bool>
</property>
<property name="geometry" > <property name="geometry" >
<rect> <rect>
<x>107</x> <x>107</x>
@ -308,6 +310,9 @@ p, li { white-space: pre-wrap; }
<height>22</height> <height>22</height>
</rect> </rect>
</property> </property>
<property name="text" >
<string>Primary Data Here!</string>
</property>
</widget> </widget>
</widget> </widget>
</widget> </widget>