1 | sclass Screenshot extends Concept { |
2 | S pngPath; // optional, relative (program ID + "/" + file name) |
3 | Rect r; // optional, rectangle that was shot |
4 | |
5 | *() {} // for persistance |
6 | *(BufferedImage img) { |
7 | savePNG(pngFile(), img); |
8 | } |
9 | |
10 | File pngFile() { |
11 | if (pngPath != null) |
12 | ret prepareFile(new File(javaxDataDir(), pngPath)); |
13 | ret prepareProgramFile(_programID(), "screenshot" + id + ".png"); |
14 | } |
15 | |
16 | BufferedImage loadImage() { |
17 | ret loadImage2(pngFile()); |
18 | } |
19 | |
20 | bool hasImage() { |
21 | ret pngFile().exists(); |
22 | } |
23 | } |
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: | #1006579 |
Snippet name: | concept Screenshot |
Eternal ID of this version: | #1006579/1 |
Text MD5: | 4ea2df2c58c33c3393a6476b6ab17cc3 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-01-18 20:34:19 |
Source code size: | 561 bytes / 23 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 559 / 1172 |
Referenced in: | [show references] |