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

17
LINES

< > BotCompany Repo | #1004064 // tbShowImageAndRects [OLD]

JavaX fragment (include)

1  
lib 1003956 // TinyBrain
2  
3  
import prophecy.common.image.BWImage;
4  
import prophecy.common.image.Overlay;
5  
import prophecy.common.image.ImageSurface;
6  
7  
static void tbShowImageAndRects(BWImage img, final L<Rectangle> rects) {
8  
  ImageSurface is = new ImageSurface(img);
9  
  Overlay overlay = new Overlay {
10  
    public void paint(ImageSurface imageSurface, Graphics2D g) {
11  
      for (Rectangle r : unnull(rects))
12  
        imageSurface.drawSelectionRect(g, r, Color.blue, Color.white);
13  
    }
14  
  };
15  
  is.setOverlay(overlay);
16  
  showFrame(new JScrollPane(is));
17  
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1004064
Snippet name: tbShowImageAndRects [OLD]
Eternal ID of this version: #1004064/2
Text MD5: a90a91ea2f06621736c4725fc4d16635
Author: stefan
Category: javax / ocr
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-02-13 16:06:29
Source code size: 560 bytes / 17 lines
Pitched / IR pitched: No / No
Views / Downloads: 452 / 443
Version history: 1 change(s)
Referenced in: [show references]