imageRectForPaper method

NSRect imageRectForPaper(
  1. NSString? paperName
)

imageRectForPaper:

Implementation

NSRect imageRectForPaper(objc.NSString? paperName) {
  objc.checkOsVersionInternal(
    'NSPrinter.imageRectForPaper:',
    iOS: (true, null),
    macOS: (false, (10, 0, 0)),
  );
  final _ptr = pkg_ffi.calloc<NSRect>();
  objc.useMsgSendVariants
      ? _objc_msgSend_qrtfceStret(
          _ptr,
          this.ref.pointer,
          _sel_imageRectForPaper_,
          paperName?.ref.pointer ?? ffi.nullptr,
        )
      : _ptr.ref = _objc_msgSend_qrtfce(
          this.ref.pointer,
          _sel_imageRectForPaper_,
          paperName?.ref.pointer ?? ffi.nullptr,
        );
  final _finalizable = _ptr.cast<ffi.Uint8>().asTypedList(
    ffi.sizeOf<NSRect>(),
    finalizer: pkg_ffi.calloc.nativeFree,
  );
  return ffi.Struct.create<NSRect>(_finalizable);
}