getTextureSize method

Size getTextureSize()

**** GET TEXTURE SIZE Get the size of the current texture. If not set it returns Size(-1, -1)

Implementation

Size getTextureSize() {
  ffi.Pointer<ffi.Int32> w = calloc(ffi.sizeOf<ffi.Int32>());
  ffi.Pointer<ffi.Int32> h = calloc(ffi.sizeOf<ffi.Int32>());

  _textureSize(w, h);
  Size size = Size(w.value.toDouble(), h.value.toDouble());

  calloc.free(w);
  calloc.free(h);
  return size;
}