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