去掉出图2个页面之间的黑线

This commit is contained in:
jiayulong 2026-04-28 21:31:25 +08:00
parent e4bcd5afc6
commit 526f0eeb95

View File

@ -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();
}