boundingRectForGlyph method

CGRect boundingRectForGlyph(
  1. DartNSGlyph glyph
)

boundingRectForGlyph:

Implementation

NSRect boundingRectForGlyph(DartNSGlyph glyph) {
  objc.checkOsVersionInternal(
    'NSFont.boundingRectForGlyph:',
    iOS: (true, null),
  );
  final _ptr = pkg_ffi.calloc<NSRect>();
  objc.useMsgSendVariants
      ? _objc_msgSend_yaikepStret(
          _ptr,
          this.ref.pointer,
          _sel_boundingRectForGlyph_,
          glyph,
        )
      : _ptr.ref = _objc_msgSend_yaikep(
          this.ref.pointer,
          _sel_boundingRectForGlyph_,
          glyph,
        );
  final _finalizable = _ptr.cast<ffi.Uint8>().asTypedList(
    ffi.sizeOf<NSRect>(),
    finalizer: pkg_ffi.calloc.nativeFree,
  );
  return ffi.Struct.create<NSRect>(_finalizable);
}