MCPcopy Create free account
hub / github.com/arrayfire/arrayfire / setWindowChartGrid

Method setWindowChartGrid

src/backend/common/graphics_common.cpp:299–322  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

297}
298
299void ForgeManager::setWindowChartGrid(const fg_window window, const int r,
300 const int c) {
301 auto chart_iter = mChartMap.find(window);
302
303 if (chart_iter != mChartMap.end()) {
304 // ChartVec found. Clear it.
305 // This has to be cleared as there is no guarantee that existing
306 // chart types(2D/3D) match the future grid requirements
307 for (const ChartPtr& c : chart_iter->second) {
308 if (c) { mChartAxesOverrideMap.erase(c->handle); }
309 }
310 (chart_iter->second).clear(); // Clear ChartList
311 auto gIter = mWndGridMap.find(window);
312 gIter->second = make_pair(1, 1);
313 }
314
315 if (r == 0 || c == 0) {
316 mChartMap.erase(window);
317 mWndGridMap.erase(window);
318 } else {
319 mChartMap[window] = ChartList(r * c);
320 mWndGridMap[window] = std::make_pair(r, c);
321 }
322}
323
324ForgeManager::WindowGridDims ForgeManager::getWindowGrid(
325 const fg_window window) {

Callers 3

getMainWindowMethod · 0.95
af_gridFunction · 0.80
af_destroy_windowFunction · 0.80

Calls 1

findMethod · 0.80

Tested by

no test coverage detected