Пример #1
0
        public byte[] renderToBuffer(IndigoObject obj)
        {
            _indigo.setSessionID();
            using (IndigoObject bufh = _indigo.writeBuffer()) {
                _indigo.checkResult(_renderer_lib.indigoRender(obj.self, bufh.self));
                byte *buf;
                int   bufsize;
                _indigo.checkResult(_indigo._indigo_lib.indigoToBuffer(bufh.self, &buf, &bufsize));

                byte[] res = new byte[bufsize];
                for (int i = 0; i < bufsize; ++i)
                {
                    res [i] = buf [i];
                }
                return(res);
            }
        }