| 1 | static L<IntRange> pixelSetBoundsByLine(PixelSet set) {
 | 
| 2 | final Rect rect = pixelSetBounds(set); | 
| 3 |   L<IntRange> l = repFunc(func -> IntRange { IntRange(rect.x+rect.w, rect.x) }, rect.h);
 | 
| 4 |   for (Pixel p : set) {
 | 
| 5 | IntRange r = l.get(p.y-rect.y); | 
| 6 | int x = p.x-rect.x; | 
| 7 | r.start = min(x, r.start); | 
| 8 | r.end = max(x+1, r.end); | 
| 9 | } | 
| 10 | ret l; | 
| 11 | } | 
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: | 632 / 656 | 
| Version history: | 7 change(s) | 
| Referenced in: | [show references] |