Libraryless. Click here for Pure Java version (4665L/26K).
// changes & returns canvas static BufferedImage drawImage(BufferedImage canvas, Image img, Pt p) { ret drawImageOnImage(img, canvas, p.x, p.y); } svoid drawImage(Graphics2D etc g, Image img) { drawImage(g, img, 0, 0); } svoid drawImage(Graphics2D g, Image img, Pt p) { drawImage(g, img, p.x, p.y); } svoid drawImage(Graphics2D g, Image img, int x, int y) { g?.drawImage(img, x, y, null); }
Began life as a copy of #1007273
download show line numbers debug dex old transpilations
Travelled to 5 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt
No comments. add comment
Snippet ID: | #1030573 |
Snippet name: | drawImage |
Eternal ID of this version: | #1030573/4 |
Text MD5: | ab1ae97b3ab77ca7a5ecf2a8daf33b20 |
Transpilation MD5: | ff9741d5f7e059cdad88597dce10dda6 |
Author: | stefan |
Category: | javax / imaging |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-10-27 14:33:03 |
Source code size: | 416 bytes / 16 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 216 / 1135 |
Version history: | 3 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |