calloc method

Pointer<SdlFRect> calloc()

Implementation

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