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).

svoid drawPixels(BufferedImage img, Iterable<Pt> points, Color color) {
  if (img == null) ret;
  var g = createGraphics(img);
  drawPixels(g, points, color);
}

svoid drawPixels(Graphics2D g, Iterable<Pt> points, Color color) {
  fOr (p : points)
    drawPixel(g, p, color);
}

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: 63 / 92
Version history: 2 change(s)
Referenced in: [show references]