srecord noeq G22VisualizeMeshes(WidthAndHeight originalImage, L meshes) { // anchorAlpha overrides alpha in anchorColor settable Color anchorColor = Color.red; settable double anchorAlpha = 0.5; settable int anchorSize = 5; // can also include alpha settable Color curveColor = Color.blue; BufferedImage get() { var markedImage = whiteImage(imageSize(originalImage)); for (mesh : meshes) for (curve : mesh.curves()) drawPixels(markedImage, curve.path().pointIterator(), curveColor); for (mesh : meshes) markPointsInImageWithAlpha(markedImage, mesh.anchorPts(), anchorColor, anchorAlpha, anchorSize); ret markedImage; } }