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

11
LINES

< > BotCompany Repo | #1015001 // renderBackgroundPlusRoundedBoxes

JavaX fragment (include)

static BufferedImage renderBackgroundPlusRoundedBoxes(int w, int h, BackgroundPlus<RoundedBoxWithColor> s) {
  BufferedImage bi = newBufferedImage(w, h, toColor(s.background));
  Graphics2D g = imageGraphics(bi);
  for (RoundedBoxWithColor e : s.things) {
    int x1 = min(e.a.x, e.b.x), y1 = min(e.a.y, e.b.y);
    int x2 = max(e.a.x, e.b.x), y2 = max(e.a.y, e.b.y);
    fillRoundedBox(g, x1, y1, x2-x1+1, y2-y1+1, e.roundness, toColor(e.color));
  }
  g.dispose();
  ret bi;
}

Author comment

Began life as a copy of #1014969

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: #1015001
Snippet name: renderBackgroundPlusRoundedBoxes
Eternal ID of this version: #1015001/3
Text MD5: 4a2ec8692aa995c450d5533d9fe5ee10
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-05-06 23:05:38
Source code size: 488 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 326 / 365
Version history: 2 change(s)
Referenced in: [show references]