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

12
LINES

< > BotCompany Repo | #1035266 // G22HolePaths (trace holes of a region)

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (10923L/61K).

1  
srecord noeq G22HolePaths(IImageRegion region) {
2  
  // paths are not closed (first pixel not added again at the end)
3  
  
4  
  L<OnePathWithOrigin> get() {
5  
    L<PtBuffer> outlines = region.createdWithDiagonals()
6  
      ? g22_allBorderTraces_withDiagonals(region)
7  
      : g22_allBorderTraces(region);
8  
    
9  
    ret map(dropFirst(outlines),
10  
      points -> new OnePathWithOrigin(points, false));
11  
  }
12  
}

Author comment

Began life as a copy of #1034971

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, ekrmjmnbrukm, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1035266
Snippet name: G22HolePaths (trace holes of a region)
Eternal ID of this version: #1035266/2
Text MD5: c87a51bb84e6086d67cd85686d3599f2
Transpilation MD5: 06e744db5dde71f50cde2179d3b838ae
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-04-28 16:57:26
Source code size: 403 bytes / 12 lines
Pitched / IR pitched: No / No
Views / Downloads: 130 / 202
Version history: 1 change(s)
Referenced in: [show references]