VecRect2f.generate constructor
Implementation
factory VecRect2f.generate(int length, Rect2f Function(int i) generator, {bool dispose = true}) {
final pp = calloc<cvg.VecRect2f>()..ref.length = length;
pp.ref.ptr = calloc<cvg.CvRect2f>(length);
for (var i = 0; i < length; i++) {
final v = generator(i);
pp.ref.ptr[i] = v.ref;
if (dispose) v.dispose();
}
return VecRect2f.fromPointer(pp);
}