Libraryless. Click here for Pure Java version (901L/7K/28K).
1 | !752 |
2 | |
3 | static JFrame frame; |
4 | static JLabel l; |
5 | static BufferedImage theimage, inverted; |
6 | static ImageIcon ii1, ii2; |
7 | |
8 | static int delay = 0, delay2 = 210; |
9 | |
10 | p { |
11 | theimage = scaleImage(loadBufferedImage("#1004501"), 1.5); |
12 | l = jcenterimage(theimage); |
13 | l.setOpaque(true); |
14 | l.setBackground(Color.black); |
15 | onDoubleClick(l, r { frame.dispose() }); |
16 | frame = showFullScreen(l); |
17 | |
18 | pcall { |
19 | call(_getClass("com.sun.java.swing.SwingUtilities3"), "setVsyncRequested", frame, true); |
20 | } |
21 | |
22 | effect(); |
23 | } |
24 | |
25 | svoid effect { |
26 | invertImage(inverted = cloneBufferedImage(theimage)); |
27 | ii1 = imageIcon(theimage); |
28 | ii2 = imageIcon(inverted); |
29 | |
30 | effect_go(); |
31 | } |
32 | |
33 | svoid effect_go { |
34 | awtIfNecessary { |
35 | l.setIcon(ii2); |
36 | //l.repaint(); |
37 | swingAfter(frame, delay, r { |
38 | l.setIcon(ii1); |
39 | //l.repaint(); |
40 | swingAfter(frame, delay2, "effect_go"); |
41 | }); |
42 | } |
43 | } |
Began life as a copy of #1004507
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1004510 |
Snippet name: | Peppermint Logo Full-Screen, Testing Effects 2 |
Eternal ID of this version: | #1004510/1 |
Text MD5: | 21d5382b5803345908e235cb0afb6262 |
Transpilation MD5: | 57b47b211604011fac72c112f9550455 |
Author: | stefan |
Category: | javax |
Type: | JavaX source code |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2016-08-19 00:14:15 |
Source code size: | 905 bytes / 43 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 567 / 701 |
Referenced in: | [show references] |