mirror of
https://github.com/YACReader/yacreader
synced 2025-06-03 17:18:23 -04:00
normalizaci?n en altura en modo de p?ginas dobles
This commit is contained in:
parent
711b335756
commit
93b1732829
@ -400,14 +400,23 @@ void DoublePageRender::run()
|
||||
img2 = QPixmap(img.width(),img.height());*/
|
||||
|
||||
int x,y;
|
||||
x = img.width()+img2.width();
|
||||
//x = img.width()+img2.width();
|
||||
y = qMax(img.height(),img2.height());
|
||||
|
||||
//widths fiting the normalized height
|
||||
int width1, width2;
|
||||
|
||||
//altura normalizada
|
||||
if(img.height()!=y)
|
||||
x = (width1 = ((img.width() * y) / img2.height())) + (width2 = img2.width());
|
||||
else
|
||||
x = (width1 = img.width()) + (width2 = ((img2.width() * y) / img.height()));
|
||||
|
||||
|
||||
QImage auxImg(x,y,QImage::Format_RGB32);
|
||||
QPainter painter(&auxImg);
|
||||
painter.drawImage(0,0,img);
|
||||
painter.drawImage(img.width(),0,img2);
|
||||
painter.drawImage(QRect(0,0,width1,y),img);
|
||||
painter.drawImage(QRect(width1,0,width2,y),img2);
|
||||
painter.end();
|
||||
|
||||
if(degrees > 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user