Sub Process_Globals
Private fx As JFX
Private MainForm As Form
Dim xui As XUI
Dim OCR As xOCR
End Sub
Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
MainForm.RootPane.LoadLayout("Main") 'Load the layout file.
MainForm.Show
xui.SetDataFolder("OCR")
OCR.Initialize(Me,"ocr","your_api_key")
OCR.OCR("ger",xui.LoadBitmap(File.DirAssets,"image.jpg"),False,True)
End Sub
'Return true to allow the default exceptions handler to handle the uncaught exception.
Sub Application_Error (Error As Exception, StackTrace As String) As Boolean
Return True
End Sub
Sub OCR_finished (Text As String,ProcessingTime As Int)
Log(Text)
Log(ProcessingTime & " ms")
End Sub
Sub OCR_overlay (Overlay As Map)
Log(Overlay)
End Sub