Starting to implement display of reference spectrum in plotter.cpp.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@6604 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor
2016-04-09 14:51:20 +00:00
parent 24740df432
commit b19825ac77
4 changed files with 20 additions and 10 deletions
+7 -1
View File
@@ -168,11 +168,17 @@ void CPlotter::draw(float swide[], bool bScroll) //dr
float sum=0.0;
int j=j0+m_binsPerPixel*i;
for(int k=0; k<m_binsPerPixel; k++) {
sum+=jt9w_.syellow[j++];
sum+=spectra_.syellow[j++];
}
y2=gain2d*sum/m_binsPerPixel + m_plot2dZero;
}
if(m_bReference) { //Reference (red)
float df_ref=12000.0/6912.0;
int j=FreqfromX(i)/df_ref + 0.5;
y2=gain2d*spectra_.ref[j] + m_plot2dZero;
}
if(i==iz-1) painter2D.drawPolyline(LineBuf,j);
LineBuf[j].setX(i);
LineBuf[j].setY(int(0.9*m_h2-y2*m_h2/70.0));