in indigo_renderer.js [104:122]
IndigoRenderer.prototype.renderGridToBuffer = function(objects, refatoms, ncolumns) {
this.indigo._setSessionId();
let arr = null;
if (refatoms) {
if (refatoms.length !== objects.count())
throw new IndigoException('renderGridToBuffer(): refatoms[] size must be equal to the number of objects');
// TODO: check python conformance
arr = refatoms;
}
let wb = this.indigo.writeBuffer();
try {
this.indigo._checkResult(this._lib.indigoRenderGrid(objects.id, arr, ncolumns, wb.id));
return wb.toBuffer();
} finally {
wb.dispose();
}
};