Libraryless. Click here for Pure Java version (3077L/18K).
1 | static BufferedImage renderRenderable(int w, int h, Renderable r) { |
2 | BufferedImage img = newBufferedImage(w, h); |
3 | r?.renderOn(imageGraphics(img), w, h); |
4 | ret img; |
5 | } |
6 | |
7 | // modifies original image |
8 | static BufferedImage renderRenderable(BufferedImage img, Renderable r) { |
9 | r?.renderOn(imageGraphics(img), img.getWidth(), img.getHeight()); |
10 | ret img; |
11 | } |
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1015029 |
Snippet name: | renderRenderable |
Eternal ID of this version: | #1015029/3 |
Text MD5: | 9f202dbdbaf520cf6bcabbad1ccc1ab9 |
Transpilation MD5: | 54d90845cf2162a5e7d23f0294278f06 |
Author: | stefan |
Category: | javax / imaging |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-01-07 18:30:32 |
Source code size: | 359 bytes / 11 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 461 / 544 |
Version history: | 2 change(s) |
Referenced in: | [show references] |