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

7
LINES

< > BotCompany Repo | #1009941 // paintTiledBackground

JavaX fragment (include)

1  
static void paintTiledBackground(Component c, Graphics g, BufferedImage image) {
2  
  int width = c.getWidth();  
3  
  int height = c.getHeight();  
4  
  for (int x = 0; x < width; x += image.getWidth())  
5  
    for (int y = 0; y < height; y += image.getHeight())
6  
      g.drawImage(image, x, y, c);
7  
}

Author comment

Began life as a copy of #1006894

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: #1009941
Snippet name: paintTiledBackground
Eternal ID of this version: #1009941/3
Text MD5: 7a3a6a8c31b4e142c7a54f18876baacb
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-08-27 03:15:58
Source code size: 295 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 514 / 553
Version history: 2 change(s)
Referenced in: [show references]