concept Screenshot { 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(); } } Screenshot > TransientScreenshot { transient BufferedImage img; *() {} // for persistance *(BufferedImage *img) {} bool hasImage() { ret img != null; } BufferedImage loadImage() { ret img; } void disposeImage() { img = null; } } Clip > MarkedClip { new Ref<Screenshot> screenshot; Rect positionInScreenshot; } concept Clip { long originalID; // ID in #1005389 BWImage img; S description; } concept Found { new Ref<Screenshot> screenshot; new Ref<Clip> clip; FoundImg fi; // contains Rect r } concept FullySearched { new Ref<Screenshot> screenshot; new Ref<Clip> clip; }
Began life as a copy of #1005530
download show line numbers debug dex old transpilations
Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1005686 |
Snippet name: | PIF [Persistent Image Finder] Classes v2 |
Eternal ID of this version: | #1005686/1 |
Text MD5: | ad93f956785467be5b83f03d3ae1c84a |
Author: | stefan |
Category: | javax / ocr |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2016-12-03 22:41:09 |
Source code size: | 1196 bytes / 57 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 545 / 2031 |
Referenced in: | [show references] |