From 526f0eeb95a4d07f27271a6c1310b16a4ff963bd Mon Sep 17 00:00:00 2001 From: jiayulong Date: Tue, 28 Apr 2026 21:31:25 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E5=87=BA=E5=9B=BE2=E4=B8=AA?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E4=B9=8B=E9=97=B4=E7=9A=84=E9=BB=91=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- logPlus/mainwindowcurve.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/logPlus/mainwindowcurve.cpp b/logPlus/mainwindowcurve.cpp index 7c92152..042b6dd 100644 --- a/logPlus/mainwindowcurve.cpp +++ b/logPlus/mainwindowcurve.cpp @@ -2755,6 +2755,7 @@ void MainWindowCurve::_slotExport(QPrinter &printer, int IsBmp, QString pngName, { iHeightOfScreen = g_iHeight_MyCustom; } + iHeightOfScreen = iHeightOfScreen - 2; double dScrollHeight = iHeightOfScreen/g_dPixelPerCm/100.0 * (double)m_iScale; double dDeep = m_iY2-m_iY1; @@ -2784,7 +2785,7 @@ void MainWindowCurve::_slotExport(QPrinter &printer, int IsBmp, QString pngName, int iTableSize_Head = 0; getTableSize_Head(iTableSize_Head); // - int iTableWellTrack_height = ui->tableWidget_2->rowHeight(0) + (9+3) + iTableSize_Head; + int iTableWellTrack_height = ui->tableWidget_2->rowHeight(0) + (9+3) + iTableSize_Head -1; //图片高度 int iTotalSize_Height = iHight_Head+iHight_Tail; int iNum = dDeep/dScrollHeight; @@ -2894,7 +2895,7 @@ void MainWindowCurve::_slotExport(QPrinter &printer, int IsBmp, QString pngName, { //最后1页 ui->centralwidget->setGeometry(geoRect.x(), geoRect.y(), iMaxWidth, iHight+40); - QPixmap pPixmap = this->grab(QRect(geoRect.x(), geoRect.y()+iTableWellTrack_height, iMaxWidth, dLastHeight-2)); + QPixmap pPixmap = this->grab(QRect(geoRect.x(), geoRect.y()+iTableWellTrack_height, iMaxWidth, dLastHeight)); //保存,方便查看 if(g_iDebug) { @@ -2903,7 +2904,7 @@ void MainWindowCurve::_slotExport(QPrinter &printer, int IsBmp, QString pngName, if(IsBmp == 0 || IsBmp == 4) { //pdf,svg - painter.drawPixmap(0, iHight_Head + iTableWellTrack_height + (iHeightOfScreen-2)*iLoop, pPixmap); + painter.drawPixmap(0, iHight_Head + iTableWellTrack_height + (iHeightOfScreen)*iLoop, pPixmap); } else { @@ -2912,7 +2913,7 @@ void MainWindowCurve::_slotExport(QPrinter &printer, int IsBmp, QString pngName, } else{ ui->centralwidget->setGeometry(geoRect.x(), geoRect.y(), iMaxWidth, iHight+40); - QPixmap pPixmap = this->grab(QRect(geoRect.x(), geoRect.y()+iTableWellTrack_height, iMaxWidth, iHeightOfScreen-2)); + QPixmap pPixmap = this->grab(QRect(geoRect.x(), geoRect.y()+iTableWellTrack_height, iMaxWidth, iHeightOfScreen)); //保存,方便查看 if(g_iDebug) { @@ -2921,7 +2922,7 @@ void MainWindowCurve::_slotExport(QPrinter &printer, int IsBmp, QString pngName, if(IsBmp == 0 || IsBmp == 4) { //pdf,svg - painter.drawPixmap(0, iHight_Head + iTableWellTrack_height + (iHeightOfScreen-2)*iLoop, pPixmap); + painter.drawPixmap(0, iHight_Head + iTableWellTrack_height + (iHeightOfScreen)*iLoop, pPixmap); } else { @@ -2938,9 +2939,9 @@ void MainWindowCurve::_slotExport(QPrinter &printer, int IsBmp, QString pngName, mDepthProgress.SetShowName(s); mDepthProgress.SetDepth(iNumShow+2); // - painter.drawPixmap(0, iHight_Head + iTableWellTrack_height + (iHeightOfScreen-2)*(iNum-1) + (dLastHeight-2), pPixmap_wellTrackInfo); + painter.drawPixmap(0, iHight_Head + iTableWellTrack_height + (iHeightOfScreen)*(iNum-1) + (dLastHeight), pPixmap_wellTrackInfo); //尾 - painter.drawPixmap(0, iHight_Head + iTableWellTrack_height*2 + (iHeightOfScreen-2)*(iNum-1) + (dLastHeight-2), pPixmap_Tail); + painter.drawPixmap(0, iHight_Head + iTableWellTrack_height*2 + (iHeightOfScreen)*(iNum-1) + (dLastHeight), pPixmap_Tail); //结束 painter.end(); }