Mercurial > hg > aimc
comparison src/Modules/Output/Graphics/GraphicsViewTime.cc @ 126:a9cb396529c2
- Added support for movies!
author | tomwalters |
---|---|
date | Thu, 21 Oct 2010 01:46:39 +0000 |
parents | 3cdaa81c3aca |
children | 48e5fc566441 |
comparison
equal
deleted
inserted
replaced
125:bf1417b5d83e | 126:a9cb396529c2 |
---|---|
41 module_type_ = "output"; | 41 module_type_ = "output"; |
42 module_version_ = "$Id: $"; | 42 module_version_ = "$Id: $"; |
43 } | 43 } |
44 | 44 |
45 GraphicsViewTime *GraphicsViewTime::Clone(GraphicsOutputDevice *pDev) { | 45 GraphicsViewTime *GraphicsViewTime::Clone(GraphicsOutputDevice *pDev) { |
46 GraphicsViewTime *pView = new GraphicsViewTime(m_pParam); | 46 GraphicsViewTime *pView = new GraphicsViewTime(parameters_); |
47 // Copy everything | 47 // Copy everything |
48 pView->m_pAxisX->SetDisplayRange(m_pAxisX->m_fMax, m_pAxisX->m_fMin); | 48 pView->m_pAxisX->SetDisplayRange(m_pAxisX->m_fMax, m_pAxisX->m_fMin); |
49 pView->m_pAxisX->SetDisplayScale(m_pAxisX->m_pScale->getType()); | 49 pView->m_pAxisX->SetDisplayScale(m_pAxisX->m_pScale->getType()); |
50 pView->m_pAxisY->SetDisplayRange(m_pAxisY->m_fMax, m_pAxisY->m_fMin); | 50 pView->m_pAxisY->SetDisplayRange(m_pAxisY->m_fMax, m_pAxisY->m_fMin); |
51 pView->m_pAxisY->SetDisplayScale(m_pAxisY->m_pScale->getType()); | 51 pView->m_pAxisY->SetDisplayScale(m_pAxisY->m_pScale->getType()); |
65 m_pDev->gBeginLineStrip(); | 65 m_pDev->gBeginLineStrip(); |
66 m_pDev->gVertex2f(m_fMarginLeft, m_fMarginBottom); | 66 m_pDev->gVertex2f(m_fMarginLeft, m_fMarginBottom); |
67 m_pDev->gVertex2f(1.0f-m_fMarginRight, m_fMarginBottom); | 67 m_pDev->gVertex2f(1.0f-m_fMarginRight, m_fMarginBottom); |
68 m_pDev->gEnd(); | 68 m_pDev->gEnd(); |
69 | 69 |
70 if (!m_bPlotLabels) | 70 //if (!m_bPlotLabels) |
71 return; | 71 // return; |
72 | 72 |
73 // Labels | 73 // Labels |
74 char sTxt[80]; | 74 char sTxt[80]; |
75 snprintf(sTxt, sizeof(sTxt) / sizeof(sTxt[0]), | 75 snprintf(sTxt, sizeof(sTxt) / sizeof(sTxt[0]), |
76 _S("%s [%.0f..%.0f Hz, %s scale]"), | 76 _S("%s [%.0f..%.0f Hz, %s scale]"), |
86 m_pAxisX->m_pScale->getName()); | 86 m_pAxisX->m_pScale->getName()); |
87 | 87 |
88 m_pDev->gText2f(m_fMarginLeft, 0.0025f, sTxt, false); | 88 m_pDev->gText2f(m_fMarginLeft, 0.0025f, sTxt, false); |
89 | 89 |
90 // Frame time | 90 // Frame time |
91 //snprintf(sTxt, sizeof(sTxt)/sizeof(sTxt[0]), _S("t=%.0f ms"), | 91 snprintf(sTxt, sizeof(sTxt)/sizeof(sTxt[0]), _S("t=%.0f ms"), |
92 // pBank->getSampleTime(0)); | 92 1000.0 * bank.start_time() / bank.sample_rate()); |
93 //m_pDev->gText2f(0.8f, 0.0025f, sTxt, false); | 93 m_pDev->gText2f(0.8f, 0.0025f, sTxt, false); |
94 } | 94 } |
95 | 95 |
96 void GraphicsViewTime::PlotData(const vector<float> &signal, | 96 void GraphicsViewTime::PlotData(const vector<float> &signal, |
97 float sample_rate, | 97 float sample_rate, |
98 float yOffset, | 98 float yOffset, |