裂缝 画图
This commit is contained in:
parent
1ded82d9b8
commit
fd0965b679
|
|
@ -210,8 +210,8 @@ void CPickFrac::drawOne(FRAC_TABLE_Crack frac, QString cs, int iType, int nLineW
|
||||||
for(j=0; j<nPoint-1; j++)
|
for(j=0; j<nPoint-1; j++)
|
||||||
{
|
{
|
||||||
QCPItemLine *qcpItemLine = new QCPItemLine(m_myCustomPlot);
|
QCPItemLine *qcpItemLine = new QCPItemLine(m_myCustomPlot);
|
||||||
qcpItemLine->start->setCoords(frac.point[j].x, -frac.point[j].y);
|
qcpItemLine->start->setCoords(frac.point[j].x/8, -frac.point[j].y);
|
||||||
qcpItemLine->end->setCoords(frac.point[j+1].x, -frac.point[j+1].y);
|
qcpItemLine->end->setCoords(frac.point[j+1].x/8, -frac.point[j+1].y);
|
||||||
qcpItemLine->setPen(pPen);
|
qcpItemLine->setPen(pPen);
|
||||||
j++;//j+2
|
j++;//j+2
|
||||||
}
|
}
|
||||||
|
|
@ -221,18 +221,17 @@ void CPickFrac::drawOne(FRAC_TABLE_Crack frac, QString cs, int iType, int nLineW
|
||||||
for(j=0; j<nPoint; j++)
|
for(j=0; j<nPoint; j++)
|
||||||
{
|
{
|
||||||
QCPItemLine *qcpItemLine = new QCPItemLine(m_myCustomPlot);
|
QCPItemLine *qcpItemLine = new QCPItemLine(m_myCustomPlot);
|
||||||
qcpItemLine->start->setCoords(frac.point[j].x, -frac.point[j].y);
|
qcpItemLine->start->setCoords(frac.point[j].x / 8, -frac.point[j].y);
|
||||||
if(j>=(nPoint-1))
|
if(j>=(nPoint-1))
|
||||||
{
|
{
|
||||||
qcpItemLine->end->setCoords(frac.point[0].x, -frac.point[0].y);
|
qcpItemLine->end->setCoords(frac.point[0].x / 8, -frac.point[0].y);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
qcpItemLine->end->setCoords(frac.point[j+1].x, -frac.point[j+1].y);
|
qcpItemLine->end->setCoords(frac.point[j+1].x / 8, -frac.point[j+1].y);
|
||||||
}
|
}
|
||||||
qcpItemLine->setPen(pPen);
|
qcpItemLine->setPen(pPen);
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 4: //直线
|
case 4: //直线
|
||||||
nPoint = frac.NUM;
|
nPoint = frac.NUM;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user