Warning: session_start(): open(/var/lib/php/sessions/sess_ealvnmmvfecrl1i609tah9cmp7, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
srecord noeq G22VisualizeMeshes(WidthAndHeight originalImage, L meshes) {
delegate Anchor, Curve to G22Mesh.
// can also include alpha
settable Color anchorColor = withAlpha(0.5, Color.red);
settable int anchorSize = 5;
// can also include alpha
settable Color curveColor = Color.blue;
BufferedImage get() {
var markedImage = whiteImage(imageSize(originalImage));
drawOn(createGraphics(markedImage));
ret markedImage;
}
void drawOn(Graphics2D g) {
for (mesh : meshes)
for (curve : mesh.curves())
drawCurve(g, curve);
for (mesh : meshes)
for (p : mesh.anchorPts())
drawAnchor(g, p);
}
void drawCurve(Graphics2D g, Curve curve) {
drawPixels(g, curve.path().pointIterator(), curveColor);
}
void drawAnchor(Graphics2D g, Pt p) {
fillRect(g, p.x-anchorSize/2, p.y-anchorSize/2,
anchorSize, anchorSize, anchorColor);
}
}