Libraryless. Click here for Pure Java version (19192L/119K).
1 | // mark point of interest in an animated way |
2 | svoid g22markPointAnimation(ImageSurface is, Pt pt) { |
3 | is.addOverlay(g -> { |
4 | var p = scalePt(pt, is.getZoomX(), is.getZoomY()); |
5 | double blend = zeroToOneSine(frac(sysSeconds())); |
6 | drawSquareAround(g, p, 1, blendColor(blend, Color.green, Color.red)); |
7 | drawSquareAround(g, p, 2, blendColor(blend, Color.red, Color.green)); |
8 | drawSquareAround(g, p, 3, blendColor(blend, Color.white, Color.black)); |
9 | }); |
10 | repaintEvery(is, 100); |
11 | } |
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): elmgxqgtpvxh, mqqgnosmbjvj, wnsclhtenguj
No comments. add comment
Snippet ID: | #1035969 |
Snippet name: | g22markPointAnimation |
Eternal ID of this version: | #1035969/3 |
Text MD5: | a5991c52fa2c0309739555c8d8f542db |
Transpilation MD5: | ab83abc0155cef19d77d0620a3c9c4e2 |
Author: | stefan |
Category: | javax / gazelle 22 |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-08-20 18:02:14 |
Source code size: | 497 bytes / 11 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 138 / 199 |
Version history: | 2 change(s) |
Referenced in: | [show references] |