| 231 | } |
| 232 | |
| 233 | fg_err fg_add_histogram_to_chart(fg_histogram* pHistogram, fg_chart pChart, |
| 234 | const unsigned pNBins, const fg_dtype pType) |
| 235 | { |
| 236 | try { |
| 237 | ARG_ASSERT(1, (pChart!=0)); |
| 238 | ARG_ASSERT(2, (pNBins>0)); |
| 239 | |
| 240 | common::Chart* chrt = getChart(pChart); |
| 241 | |
| 242 | // Histogram is only allowed in FG_CHART_2D |
| 243 | ARG_ASSERT(5, chrt->chartType() == FG_CHART_2D); |
| 244 | |
| 245 | common::Histogram* hist = new common::Histogram(pNBins, (forge::dtype)pType); |
| 246 | chrt->addRenderable(hist->impl()); |
| 247 | *pHistogram = getHandle(hist); |
| 248 | } |
| 249 | CATCHALL |
| 250 | |
| 251 | return FG_ERR_NONE; |
| 252 | } |
| 253 | |
| 254 | fg_err fg_add_plot_to_chart(fg_plot* pPlot, fg_chart pChart, |
| 255 | const unsigned pNPoints, const fg_dtype pType, |
no test coverage detected