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

11
LINES

< > BotCompany Repo | #1035969 // g22markPointAnimation

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

Libraryless. Click here for Pure Java version (19192L/119K).

// mark point of interest in an animated way
svoid g22markPointAnimation(ImageSurface is, Pt pt) {
  is.addOverlay(g -> {
    var p = scalePt(pt, is.getZoomX(), is.getZoomY());
    double blend = zeroToOneSine(frac(sysSeconds()));
    drawSquareAround(g, p, 1, blendColor(blend, Color.green, Color.red));
    drawSquareAround(g, p, 2, blendColor(blend, Color.red, Color.green));
    drawSquareAround(g, p, 3, blendColor(blend, Color.white, Color.black));
  });
  repaintEvery(is, 100);
}

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: 137 / 198
Version history: 2 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)