| 252 | } |
| 253 | |
| 254 | fg_err fg_add_plot_to_chart(fg_plot* pPlot, fg_chart pChart, |
| 255 | const unsigned pNPoints, const fg_dtype pType, |
| 256 | const fg_plot_type pPlotType, const fg_marker_type pMarkerType) |
| 257 | { |
| 258 | try { |
| 259 | ARG_ASSERT(1, (pChart!=0)); |
| 260 | ARG_ASSERT(2, (pNPoints>0)); |
| 261 | |
| 262 | common::Chart* chrt = getChart(pChart); |
| 263 | forge::ChartType ctype = chrt->chartType(); |
| 264 | |
| 265 | if (ctype == FG_CHART_2D) { |
| 266 | common::Plot* plt = new common::Plot(pNPoints, (forge::dtype)pType, pPlotType, |
| 267 | pMarkerType, FG_CHART_2D); |
| 268 | chrt->addRenderable(plt->impl()); |
| 269 | *pPlot = getHandle(plt); |
| 270 | } else { |
| 271 | common::Plot* plt = new common::Plot(pNPoints, (forge::dtype)pType, pPlotType, |
| 272 | pMarkerType, FG_CHART_3D); |
| 273 | chrt->addRenderable(plt->impl()); |
| 274 | *pPlot = getHandle(plt); |
| 275 | } |
| 276 | } |
| 277 | CATCHALL |
| 278 | |
| 279 | return FG_ERR_NONE; |
| 280 | } |
| 281 | |
| 282 | fg_err fg_add_surface_to_chart(fg_surface* pSurface, fg_chart pChart, |
| 283 | const unsigned pXPoints, const unsigned pYPoints, const fg_dtype pType, |
no test coverage detected