MCPcopy Create free account
hub / github.com/MiniZinc/MiniZincIDE / savePixelTree

Method savePixelTree

cp-profiler/src/cpprofiler/conductor.cpp:408–418  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

406}
407
408void Conductor::savePixelTree(Execution *e, const char* path, int compression_factor) const {
409 const auto &nt = e->tree();
410 pixel_view::PtCanvas pc(nt);
411 auto pi = pc.get_pimage();
412 pc.setCompression(compression_factor);
413 int width = pi->pixel_size()*pc.totalSlices();
414 int height = pi->pixel_size()*nt.node_stats().maxDepth();
415 pi->resize({width,height});
416 pc.redrawAll(true);
417 pi->raw_image().save(path);
418}
419
420void Conductor::saveSearch(Execution *e, const char *path) const
421{

Callers

nothing calls this directly

Calls 7

get_pimageMethod · 0.80
setCompressionMethod · 0.80
pixel_sizeMethod · 0.80
totalSlicesMethod · 0.80
maxDepthMethod · 0.80
resizeMethod · 0.45
redrawAllMethod · 0.45

Tested by

no test coverage detected