boundingRectWithSize method
boundingRectWithSize:options:
Implementation
NSRect boundingRectWithSize(
NSSize size, {
required NSStringDrawingOptions options,
}) {
objc.checkOsVersionInternal(
'NSAttributedString.boundingRectWithSize:options:',
iOS: (false, (3, 2, 0)),
macOS: (false, (10, 0, 0)),
);
final _ptr = pkg_ffi.calloc<NSRect>();
objc.useMsgSendVariants
? _objc_msgSend_fh0lbaStret(
_ptr,
this.ref.pointer,
_sel_boundingRectWithSize_options_,
size,
options.value,
)
: _ptr.ref = _objc_msgSend_fh0lba(
this.ref.pointer,
_sel_boundingRectWithSize_options_,
size,
options.value,
);
final _finalizable = _ptr.cast<ffi.Uint8>().asTypedList(
ffi.sizeOf<NSRect>(),
finalizer: pkg_ffi.calloc.nativeFree,
);
return ffi.Struct.create<NSRect>(_finalizable);
}