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

7
LINES

< > BotCompany Repo | #1035000 // drawPixelStripes

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (5151L/29K).

// draw faint one-pixel high stripes to indicate how big a pixel is
svoid drawPixelStripes(BufferedImage image) {
  int w = image.getWidth(), h = image.getHeight();
  var g = getGraphics(image);
  for y to h:
    drawLine(g, 0, y, w-1, y, even(y) ? Color.lightGray : Color.white);
}

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1035000
Snippet name: drawPixelStripes
Eternal ID of this version: #1035000/2
Text MD5: d36db6e5be7b5471f360587d14692fc0
Transpilation MD5: 4b1314a10db5689a5e36f75db65f9a95
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-03-22 18:22:16
Source code size: 288 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 67 / 105
Version history: 1 change(s)
Referenced in: [show references]