1 | static BufferedImage renderComponentToImage(final Component c) { |
2 | if (c == null) null; |
3 | ret swing(func -> BufferedImage { |
4 | int w = getWidth(c), h = getHeight(c); |
5 | BufferedImage img = newBufferedImage(w, h); |
6 | c.paint(createGraphics(img)); |
7 | ret img; |
8 | }); |
9 | } |
download show line numbers debug dex old transpilations
Travelled to 12 computer(s): bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1019014 |
Snippet name: | renderComponentToImage |
Eternal ID of this version: | #1019014/2 |
Text MD5: | 24e6a5280e8c9269dbc9ae64e24d7b42 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-10-20 21:45:28 |
Source code size: | 277 bytes / 9 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 392 / 423 |
Version history: | 1 change(s) |
Referenced in: | [show references] |