boundingBoxForControlGlyphAtIndex method

NSRect boundingBoxForControlGlyphAtIndex(
  1. DartNSUInteger glyphIndex, {
  2. required NSTextContainer forTextContainer,
  3. required NSRect proposedLineFragment,
  4. required NSPoint glyphPosition,
  5. required DartNSUInteger characterIndex,
})

boundingBoxForControlGlyphAtIndex:forTextContainer:proposedLineFragment:glyphPosition:characterIndex:

Implementation

NSRect boundingBoxForControlGlyphAtIndex(
  DartNSUInteger glyphIndex, {
  required NSTextContainer forTextContainer,
  required NSRect proposedLineFragment,
  required NSPoint glyphPosition,
  required DartNSUInteger characterIndex,
}) {
  final _ptr = pkg_ffi.calloc<NSRect>();
  objc.useMsgSendVariants
      ? _objc_msgSend_1a5wl6wStret(
          _ptr,
          this.ref.pointer,
          _sel_boundingBoxForControlGlyphAtIndex_forTextContainer_proposedLineFragment_glyphPosition_characterIndex_,
          glyphIndex,
          forTextContainer.ref.pointer,
          proposedLineFragment,
          glyphPosition,
          characterIndex,
        )
      : _ptr.ref = _objc_msgSend_1a5wl6w(
          this.ref.pointer,
          _sel_boundingBoxForControlGlyphAtIndex_forTextContainer_proposedLineFragment_glyphPosition_characterIndex_,
          glyphIndex,
          forTextContainer.ref.pointer,
          proposedLineFragment,
          glyphPosition,
          characterIndex,
        );
  final _finalizable = _ptr.cast<ffi.Uint8>().asTypedList(
    ffi.sizeOf<NSRect>(),
    finalizer: pkg_ffi.calloc.nativeFree,
  );
  return ffi.Struct.create<NSRect>(_finalizable);
}