callocInt method

Pointer<SdlRect> callocInt()

Implementation

Pointer<SdlRect> callocInt() {
  var rectsPointer = ffi.calloc<SdlRect>(length);
  for (var n = 0; n < length; n++) {
    var rectPointer = rectsPointer + n;
    rectPointer.ref.x = this[n].left.toInt();
    rectPointer.ref.y = this[n].top.toInt();
    rectPointer.ref.w = this[n].width.toInt();
    rectPointer.ref.h = this[n].height.toInt();
  }
  return rectsPointer;
}