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

13
LINES

< > BotCompany Repo | #1010170 // cycleSegmentedComponents

JavaX fragment (include)

static void cycleSegmentedComponents(final BufferedImage img, final L<ConnectedComponent> components) {
  final new Var<ImageSurface> is;
  final Var<int> iComponent = new(0);
  
  Runnable nextImage = r {
    is.set(packFrameInTopRightCorner(showZoomedImage(is!,
      cutOutPixelSet(img, components.get(iComponent!)), "Cut out " + (iComponent!+1) + "/" + l(components)));
    iComponent.set(mod(iComponent!+1, l(components));
  };
  
  callF(nextImage);
  packInTopRightCorner(addToWindow(is!, jcenteredbutton("Next", nextImage)));
}

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: #1010170
Snippet name: cycleSegmentedComponents
Eternal ID of this version: #1010170/5
Text MD5: 7b9307742ad28e19f3e17e56717e275b
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-09-05 19:58:57
Source code size: 547 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 365 / 381
Version history: 4 change(s)
Referenced in: [show references]