Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

43
LINES

< > BotCompany Repo | #1004510 // Peppermint Logo Full-Screen, Testing Effects 2

JavaX source code [tags: use-pretranspiled] - run with: x30.jar

Libraryless. Click here for Pure Java version (901L/7K/28K).

!752

static JFrame frame;
static JLabel l;
static BufferedImage theimage, inverted;
static ImageIcon ii1, ii2;

static int delay = 0, delay2 = 210;

p {
  theimage = scaleImage(loadBufferedImage("#1004501"), 1.5);
  l = jcenterimage(theimage);
  l.setOpaque(true);
  l.setBackground(Color.black);
  onDoubleClick(l, r { frame.dispose() });
  frame = showFullScreen(l);
  
  pcall {
    call(_getClass("com.sun.java.swing.SwingUtilities3"), "setVsyncRequested", frame, true);  
  }
  
  effect();
}

svoid effect {
  invertImage(inverted = cloneBufferedImage(theimage));
  ii1 = imageIcon(theimage);
  ii2 = imageIcon(inverted);
  
  effect_go();
}
  
svoid effect_go {
  awtIfNecessary {
    l.setIcon(ii2);
    //l.repaint();
    swingAfter(frame, delay, r {
      l.setIcon(ii1);
      //l.repaint();
      swingAfter(frame, delay2, "effect_go");
    });
  }
}

Author comment

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: 463 / 558
Referenced in: [show references]