VecI32.fromList constructor

VecI32.fromList(
  1. List<int> pts
)

Implementation

factory VecI32.fromList(List<int> pts) {
  final length = pts.length;
  final pdata = calloc<I32>(length);
  pdata.asTypedList(length).setRange(0, length, pts);
  final p = calloc<cvg.VecI32>()
    ..ref.length = length
    ..ref.ptr = pdata;
  return VecI32.fromPointer(p);
}