Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

15
LINES

< > BotCompany Repo | #1015393 // showImageWithRecognizedTexts_makeTeachable (old, see showImageWithRecognizedTexts_makeTeachable2)

JavaX fragment (include)

1  
svoid showImageWithRecognizedTexts_makeTeachable(final ImageSurface is, final L<RecognizedText> lines, final File outFile) {
2  
  onImageSurfaceHighlightChange(is, voidfunc(Rect r) {
3  
    RecognizedText rec = findByField(lines, +r);
4  
    setToolTip(is, rec == null ? null : str(rec.text));
5  
  });
6  
  
7  
  imageSurfacePopupMenuWhenHighlighted_top(is, voidfunc(JPopupMenu menu, final Rect r) {
8  
    addPopupMenuItem(menu, "OK", r {
9  
      RecognizedText rec = findByField(lines, +r);
10  
      appendToTextFile_uniq(outFile,
11  
        struct(ll(rec.text!, rec.r)));
12  
    });
13  
    addSeparator(menu);
14  
  });
15  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1015393
Snippet name: showImageWithRecognizedTexts_makeTeachable (old, see showImageWithRecognizedTexts_makeTeachable2)
Eternal ID of this version: #1015393/3
Text MD5: 09b74baef304eb8870a7172c3f52e281
Author: stefan
Category: javax / imaging / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-11-20 22:27:53
Source code size: 600 bytes / 15 lines
Pitched / IR pitched: No / No
Views / Downloads: 408 / 441
Version history: 2 change(s)
Referenced in: [show references]