Пример #1
0
 private async Task InitFreetype(System.Net.DownloadProgressChangedEventHandler onDownloadProgressChanged = null)
 {
     if (_freetype == null)
     {
         _freetype = new FreetypeNotoSansCJK(_modelFolderName);
         await _freetype.Init(onDownloadProgressChanged);
     }
 }
Пример #2
0
        private async Task InitFreetype(System.Net.DownloadProgressChangedEventHandler onDownloadProgressChanged = null)
#endif
        {
            if (_freetype == null)
            {
                _freetype = new FreetypeNotoSansCJK(_modelFolderName);
#if UNITY_EDITOR || UNITY_IOS || UNITY_ANDROID || UNITY_STANDALONE || UNITY_WEBGL
                yield return(_freetype.Init(onDownloadProgressChanged));
#else
                await _freetype.Init(onDownloadProgressChanged);
#endif
            }
        }
Пример #3
0
        /// <summary>
        /// Release the memory associated with this scene text detector.
        /// </summary>
        protected override void DisposeObject()
        {
            if (_textDetector != null)
            {
                _textDetector.Dispose();
                _textDetector = null;
            }

            if (_ocr != null)
            {
                _ocr.Dispose();
                _ocr = null;
            }

            if (_freetype != null)
            {
                _freetype.Dispose();
                _freetype = null;
            }
        }
Пример #4
0
        /// <summary>
        /// Clear and reset the model. Required Init function to be called again before calling ProcessAndRender.
        /// </summary>
        public void Clear()
        {
            if (_textDetector != null)
            {
                _textDetector.Dispose();
                _textDetector = null;
            }

            if (_ocr != null)
            {
                _ocr.Dispose();
                _ocr = null;
            }

            if (_freetype != null)
            {
                _freetype.Dispose();
                _freetype = null;
            }
        }