static new ThreadLocal<Double> screenLens_sleep;
static new ThreadLocal<Int> screenLens_w;
static new ThreadLocal<Int> screenLens_h;
static ImageSurface screenLens() {
final double sleep = optParam(screenLens_sleep, 0.2);
final int w = optParam(screenLens_w, 300);
final int h = optParam(screenLens_h, 300);
ret (ImageSurface) swingAndWait(func {
final ImageSurface is = alwaysOnTop(showImage(new RGBImage(w, h, Color.white;
hideConsole(;
installTimer(is, toMS(sleep), r {
Rect r = intersectWithScreen(rectAround(new Pt(mouseLocation()), w, h));
BufferedImage img = shootScreen2(r);
is.setImage(img);
});
});
}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: | #1006525 |
| Snippet name: | screenLens - show screen lens - better use class ScreenLens instead |
| Eternal ID of this version: | #1006525/1 |
| Text MD5: | d02ffe894f030a2c4104c1762d834415 |
| Author: | stefan |
| Category: | javax / gui |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2017-01-14 19:07:18 |
| Source code size: | 672 bytes / 18 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 926 / 906 |
| Referenced in: | [show references] |