boundingRectWithSize method
CGRect
boundingRectWithSize(
- CGSize size, {
- required NSStringDrawingOptions options,
- NSStringDrawingContext? context,
boundingRectWithSize:options:context:
Implementation
objc.CGRect boundingRectWithSize(
objc.CGSize size, {
required NSStringDrawingOptions options,
NSStringDrawingContext? context,
}) {
objc.checkOsVersionInternal(
'NSAttributedString.boundingRectWithSize:options:context:',
iOS: (false, (6, 0, 0)),
macOS: (false, (10, 11, 0)),
);
final _ptr = pkg_ffi.calloc<objc.CGRect>();
objc.useMsgSendVariants
? _objc_msgSend_1y1y0icStret(
_ptr,
this.ref.pointer,
_sel_boundingRectWithSize_options_context_,
size,
options.value,
context?.ref.pointer ?? ffi.nullptr,
)
: _ptr.ref = _objc_msgSend_1y1y0ic(
this.ref.pointer,
_sel_boundingRectWithSize_options_context_,
size,
options.value,
context?.ref.pointer ?? ffi.nullptr,
);
final _finalizable = _ptr.cast<ffi.Uint8>().asTypedList(
ffi.sizeOf<objc.CGRect>(),
finalizer: pkg_ffi.calloc.nativeFree,
);
return ffi.Struct.create<objc.CGRect>(_finalizable);
}