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

16
LINES

< > BotCompany Repo | #1018777 // markIntRangesOnTopOfBWImage

JavaX fragment (include)

1  
static BWImage markIntRangesOnTopOfBWImage(BWImage img, L<IntRange> l) {
2  
  ret markIntRangesOnTopOfBWImage(img, l, 10);
3  
}
4  
5  
static BWImage markIntRangesOnTopOfBWImage(BWImage img, L<IntRange> l, int h) {  BWImage bw = new(img.getWidth(), h+img.getHeight());
6  
  copyBWImage(img, 0, 0, bw, 0, h);
7  
  for (IntRange r : unnull(l))
8  
    bwFillRect(bw, r.start, 0, r.end-r.start, h, 1f);
9  
  ret bw;
10  
}
11  
12  
static BWImage markIntRangesOnTopOfBWImage(BWImage img, L<IntRange> ranges1, L<IntRange> ranges2) {
13  
  ret markIntRangesOnTopOfBWImage(
14  
    markIntRangesOnTopOfBWImage(img, ranges2, 5),
15  
    ranges1, 5);
16  
}

Author comment

Began life as a copy of #1018622

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1018777
Snippet name: markIntRangesOnTopOfBWImage
Eternal ID of this version: #1018777/5
Text MD5: 4f731da7b8901a47ebb1c22c06233655
Author: stefan
Category: javax / imaging
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-10-14 12:28:43
Source code size: 609 bytes / 16 lines
Pitched / IR pitched: No / No
Views / Downloads: 418 / 455
Version history: 4 change(s)
Referenced in: [show references]