void Plot::onDraw(GLV& g){ GraphicsData& gd = g.graphicsData(); draw::color(colors().fore); { pushGrid(); for(unsigned i=0; i<plottables().size(); ++i){ Plottable& p = *plottables()[i]; if(mActive[i] && p.drawUnderGrid()){ gd.reset(); gd.colors()[0] = p.color(); p.doPlot(gd, p.data().hasData() ? p.data() : data()); } } popGrid(); } Grid::onDraw(g); draw::color(colors().fore); // push into grid space and call attached plottables { pushGrid(); for(unsigned i=0; i<plottables().size(); ++i){ Plottable& p = *plottables()[i]; if(mActive[i] && !p.drawUnderGrid()){ gd.reset(); gd.colors()[0] = p.color(); p.doPlot(gd, p.data().hasData() ? p.data() : data()); } } popGrid(); } }
int addWave(float x1, float y1, float x2, float y2, float waveX, float waveY) { int waveres = InitWave(x1, y1, x2, y2, waveX, waveY); if (waveres) { pushGrid( MAX_COL_INDEX , MAX_ROW_INDEX ); return 1; } return 0; }