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

10
LINES

< > BotCompany Repo | #1035415 // drawPixels - also works with translucent pixels

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

Libraryless. Click here for Pure Java version (7942L/45K).

1  
svoid drawPixels(BufferedImage img, Iterable<Pt> points, Color color) {
2  
  if (img == null) ret;
3  
  var g = createGraphics(img);
4  
  drawPixels(g, points, color);
5  
}
6  
7  
svoid drawPixels(Graphics2D g, Iterable<Pt> points, Color color) {
8  
  fOr (p : points)
9  
    drawPixel(g, p, color);
10  
}

Author comment

Began life as a copy of #1034972

download  show line numbers  debug dex  old transpilations   

Travelled to 2 computer(s): mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1035415
Snippet name: drawPixels - also works with translucent pixels
Eternal ID of this version: #1035415/3
Text MD5: a698d48f37acc509ea588fb7d71a5f8b
Transpilation MD5: 10be109a403798992e2b72d37255a08d
Author: stefan
Category: javax / imaging
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-05-06 17:33:12
Source code size: 286 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 129 / 174
Version history: 2 change(s)
Referenced in: [show references]