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

16
LINES

< > BotCompany Repo | #1018777 // markIntRangesOnTopOfBWImage

JavaX fragment (include)

static BWImage markIntRangesOnTopOfBWImage(BWImage img, L<IntRange> l) {
  ret markIntRangesOnTopOfBWImage(img, l, 10);
}

static BWImage markIntRangesOnTopOfBWImage(BWImage img, L<IntRange> l, int h) {  BWImage bw = new(img.getWidth(), h+img.getHeight());
  copyBWImage(img, 0, 0, bw, 0, h);
  for (IntRange r : unnull(l))
    bwFillRect(bw, r.start, 0, r.end-r.start, h, 1f);
  ret bw;
}

static BWImage markIntRangesOnTopOfBWImage(BWImage img, L<IntRange> ranges1, L<IntRange> ranges2) {
  ret markIntRangesOnTopOfBWImage(
    markIntRangesOnTopOfBWImage(img, ranges2, 5),
    ranges1, 5);
}

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: 417 / 454
Version history: 4 change(s)
Referenced in: [show references]