Libraryless. Click here for Pure Java version (5151L/29K).
1 | // draw faint one-pixel high stripes to indicate how big a pixel is |
2 | svoid drawPixelStripes(BufferedImage image) { |
3 | int w = image.getWidth(), h = image.getHeight(); |
4 | var g = getGraphics(image); |
5 | for y to h: |
6 | drawLine(g, 0, y, w-1, y, even(y) ? Color.lightGray : Color.white); |
7 | } |
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: | 142 / 205 |
Version history: | 1 change(s) |
Referenced in: | [show references] |