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

20
LINES

< > BotCompany Repo | #1035750 // jMaxSpeedAnimationWithText

JavaX fragment (include) [tags: use-pretranspiled]

Transpiled version (19404L) is out of date.

1  
static JComponent jMaxSpeedAnimationWithText(IF0_Pair<BufferedImage, O> renderFrameWithText) {
2  
  new ImageSurface is;
3  
  is.pixelate(true);
4  
  is.autoZoomToDisplay(true);
5  
  new DoubleFPSCounter fps;
6  
  var textArea = typeWriterFont(uneditableTextArea());
7  
  awtCalcContinuously(is, -> {
8  
    try {
9  
      var imageAndText = renderFrameWithText!;
10  
      fps.inc();
11  
      is.setImage(pairA(imageAndText));
12  
      setText(textArea, nlCombine_rtrim(fps, pairB(imageAndText)));
13  
    } catch print e {
14  
      setText(textArea, exceptionToStringShort(e));
15  
      sleepSeconds(1); // error penalty
16  
    }
17  
  });
18  
  
19  
  ret jvsplit(jscroll_center_borderless(is), textArea);
20  
}

Author comment

Began life as a copy of #1035612

download  show line numbers  debug dex  old transpilations   

Travelled to 2 computer(s): elmgxqgtpvxh, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1035750
Snippet name: jMaxSpeedAnimationWithText
Eternal ID of this version: #1035750/4
Text MD5: 162336e5d1072db44880baf82ea0ad3a
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-07-22 02:41:10
Source code size: 670 bytes / 20 lines
Pitched / IR pitched: No / No
Views / Downloads: 68 / 105
Version history: 3 change(s)
Referenced in: [show references]