Libraryless. Click here for Pure Java version (14827L/102K).
1 | !7 |
2 | |
3 | import java.awt.geom.*; |
4 | |
5 | module MakeHole > DynPrintLog { |
6 | start { |
7 | dm_afterVisualize(r makeHole); |
8 | dm_afterUnvisualize(r unmakeHole); |
9 | } |
10 | |
11 | void makeHole { |
12 | Window mainWindow = getWindow(dm_desktopPane()); |
13 | if (mainWindow == null) ret; |
14 | Area shape = new Area(new Rectangle(0, 0, getWidth(mainWindow), getHeight(mainWindow))); |
15 | Area inner = new Area(toRectangle(dm_bounds())); |
16 | //Area inner = new Area(new Rectangle(100, 100, 100, 50); |
17 | shape.subtract(inner); |
18 | setWindowShape(mainWindow, shape); |
19 | } |
20 | |
21 | void unmakeHole { |
22 | setWindowShape(getWindow(dm_desktopPane()), null); |
23 | } |
24 | |
25 | void cleanMeUp { |
26 | unmakeHole(); |
27 | } |
28 | } |
download show line numbers debug dex old transpilations
Travelled to 8 computer(s): bhatertpkbcr, cfunsshuasjs, gwrvuhgaqvyk, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1020032 |
Snippet name: | See-Through Window [dev., so funny, but not really working yet] |
Eternal ID of this version: | #1020032/5 |
Text MD5: | 108e2200595066f40e0ad761ab2f6f64 |
Transpilation MD5: | 15fcbdfffa3eeaaf841d9399196870ac |
Author: | stefan |
Category: | javax / gui effects |
Type: | JavaX source code (Dynamic Module) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-12-04 16:16:19 |
Source code size: | 688 bytes / 28 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 375 / 553 |
Version history: | 4 change(s) |
Referenced in: | [show references] |