createTrackbar function
void
createTrackbar(})
Implementation
void createTrackbar(
String trackbarName,
String winName,
int maxval, {
cvg.Dartcv_TrackbarCallbackFunction? onChange,
}) {
final cTrackName = trackbarName.toNativeUtf8().cast<ffi.Char>();
final cWinName = winName.toNativeUtf8().cast<ffi.Char>();
if (onChange == null) {
cvRun(() => chighgui.cv_createTrackbar(cTrackName, cWinName, maxval));
} else {
final funcPointer = ffi.NativeCallable<cvg.cv_TrackbarCallbackFunction>.isolateLocal(onChange);
cvRun(
() => chighgui.cv_createTrackbar_1(
cTrackName,
cWinName,
ffi.nullptr,
maxval,
funcPointer.nativeFunction,
ffi.nullptr,
),
);
}
calloc.free(cTrackName);
calloc.free(cWinName);
}