static void animateBounds(final JComponent c, final Rect a, final Rect b) { animateBounds(c, a, b, 1); } static void animateBounds(final JComponent c, final Rect a, final Rect b, final double seconds) { final long startTime = sysNow(); awtEvery(c, 20, func { double s = msToSeconds(sysNow()-startTime)/seconds; if (s >= 1) { setBounds(c, b); false; } setBounds(c, blendRects(a, b, s)); null; }); }
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: | #1010656 |
Snippet name: | animateBounds |
Eternal ID of this version: | #1010656/6 |
Text MD5: | 4a18f3b87561946fe85b4bd2049a2db5 |
Author: | stefan |
Category: | javax / gui |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-09-24 03:14:02 |
Source code size: | 453 bytes / 16 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 450 / 527 |
Version history: | 5 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |