toCode method

Code toCode()

Implementation

Code toCode() {
  return Code(
    text: copyStringFromOwnedFfiPtr(text),
    isValid: isValid,
    error: copyStringFromOwnedFfiPtr(error),
    rawBytes: copyUint8ListFromOwnedFfiPtr(bytes, length),
    format: format,
    position: pos.toPosition(),
    isInverted: isInverted,
    isMirrored: isMirrored,
    duration: duration,
    imageBytes: copyUint8ListFromOwnedFfiPtr(imageBytes, imageLength),
    imageWidth: imageWidth,
    imageHeight: imageHeight,
  );
}