// 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); }