static L<IntRange> pixelSetBoundsByLine(PixelSet set) { final Rect rect = pixelSetBounds(set); L<IntRange> l = repFunc(func -> IntRange { IntRange(rect.x+rect.w, rect.x) }, rect.h); for (Pixel p : set) { IntRange r = l.get(p.y-rect.y); int x = p.x-rect.x; r.start = min(x, r.start); r.end = max(x+1, r.end); } ret l; }
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: | #1010152 | 
| Snippet name: | pixelSetBoundsByLine - effectively moves top-left corner to (0,0) | 
| Eternal ID of this version: | #1010152/8 | 
| Text MD5: | f5d0a7b2f0450e8a1d7a4bf7a19bfd11 | 
| Author: | stefan | 
| Category: | javax / imaging | 
| Type: | JavaX fragment (include) | 
| Public (visible to everyone): | Yes | 
| Archived (hidden from active list): | No | 
| Created/modified: | 2017-09-05 17:08:31 | 
| Source code size: | 354 bytes / 11 lines | 
| Pitched / IR pitched: | No / No | 
| Views / Downloads: | 631 / 654 | 
| Version history: | 7 change(s) | 
| Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) #1010191 - pixelSetBoundsByColumn - effectively moves top-left corner to (0,0) |