static BufferedImage pointsToImage_fromOrigin(Iterable<Pt> points) { var pointsList = asList(points); if (empty(pointsList)) ret whiteImage(1); Pt size = maxPt(pointsList); var img = whiteImage(size.x+2, size.y+2); for (p : pointsList) setPixel(img, p, Color.black); ret img; }
Began life as a copy of #1034967
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1034968 |
Snippet name: | pointsToImage_fromOrigin - white image with list of points marked black |
Eternal ID of this version: | #1034968/1 |
Text MD5: | da359c1ae14ce155ede80677270dde0a |
Author: | stefan |
Category: | javax / imaging |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-03-18 23:11:15 |
Source code size: | 301 bytes / 9 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 133 / 153 |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |