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

9
LINES

< > BotCompany Repo | #1001880 // fill function (fill image with color)

JavaX fragment (include)

ifclass RGBImage
static void fill(RGBImage img, S col) {
  RGB rgb = new RGB(col);
  int w = img.getWidth(), h = img.getHeight();
  for (int y = 0; y < h; y++)
    for (int x = 0; x < w; x++)
      img.setPixel(x, y, rgb);
}
endif

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: #1001880
Snippet name: fill function (fill image with color)
Eternal ID of this version: #1001880/2
Text MD5: 575b49916a4e79c32ce62a2a657b698b
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-10-22 02:12:08
Source code size: 238 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 642 / 886
Version history: 1 change(s)
Referenced in: [show references]