Libraryless. Click here for Pure Java version (4708L/27K).
1 | static BufferedImage renderRenderables(int w, int h, Iterable<Renderable> renderables) { |
2 | ret renderRenderables(newBufferedImage(w, h), renderables); |
3 | } |
4 | |
5 | // modifies original image |
6 | static BufferedImage renderRenderables(BufferedImage img, Iterable<Renderable> renderables) { |
7 | fOr (Renderable r : renderables) |
8 | r.renderOn(imageGraphics(img), img.getWidth(), img.getHeight()); |
9 | ret img; |
10 | } |
11 | |
12 | svoid renderRenderables(Graphics2D g, int w, int h, Iterable<Renderable> renderables) { |
13 | fOr (Renderable r : renderables) |
14 | r.renderOn(g, w, h); |
15 | } |
Began life as a copy of #1015029
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt
No comments. add comment
Snippet ID: | #1030558 |
Snippet name: | renderRenderables |
Eternal ID of this version: | #1030558/6 |
Text MD5: | 2c58d722370aa25e722584765dae4a48 |
Transpilation MD5: | 47820f64accd202325b16e92e350b0b2 |
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 19:55:53 |
Source code size: | 556 bytes / 15 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 239 / 347 |
Version history: | 5 change(s) |
Referenced in: | [show references] |