Libraryless. Click here for Pure Java version (4665L/26K).
1 | // changes & returns canvas |
2 | static BufferedImage drawImage(BufferedImage canvas, Image img, Pt p) { |
3 | ret drawImageOnImage(img, canvas, p.x, p.y); |
4 | } |
5 | |
6 | svoid drawImage(Graphics2D etc g, Image img) { |
7 | drawImage(g, img, 0, 0); |
8 | } |
9 | |
10 | svoid drawImage(Graphics2D g, Image img, Pt p) { |
11 | drawImage(g, img, p.x, p.y); |
12 | } |
13 | |
14 | svoid drawImage(Graphics2D g, Image img, int x, int y) { |
15 | g?.drawImage(img, x, y, null); |
16 | } |
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: | 217 / 1137 |
Version history: | 3 change(s) |
Referenced in: | [show references] |