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

13
LINES

< > BotCompany Repo | #1006204 // floodFillGrid

JavaX fragment (include)

1  
static L<Rect> floodFillGrid(BitSet grid, int gw, int gh, int g) {
2  
  new L<Rect> clips;
3  
  
4  
  for (int y = 0; y < gh; y++)
5  
    for (int x = 0; x < gw; x++)
6  
      if (grid.get(y*gw+x)) {
7  
        Rect r = floodFillGrid_step(grid, gw, gh, x, y);
8  
        r = scaleRect(r, g);
9  
        clips.add(r);
10  
      }
11  
      
12  
  ret clips;
13  
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1006204
Snippet name: floodFillGrid
Eternal ID of this version: #1006204/1
Text MD5: 326d9119fc93d258b2237ce2bd1afd94
Author: stefan
Category: javax / imaging
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-12-23 14:09:27
Source code size: 334 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 562 / 549
Referenced in: [show references]