sclass Screenshot extends Concept { S pngPath; // optional, relative (program ID + "/" + file name) Rect r; // optional, rectangle that was shot *() {} // for persistance *(BufferedImage img) { savePNG(pngFile(), img); } File pngFile() { if (pngPath != null) ret prepareFile(new File(javaxDataDir(), pngPath)); ret prepareProgramFile(_programID(), "screenshot" + id + ".png"); } BufferedImage loadImage() { ret loadImage2(pngFile()); } bool hasImage() { ret pngFile().exists(); } }
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: | 791 / 1430 |
| Referenced in: | #1034167 - Standard Classes + Interfaces (LIVE, continuation of #1003674) |