Warning: session_start(): open(/var/lib/php/sessions/sess_olbkcmp2l6rl3u1ps2d305qq0q, 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
sclass G22_TestScreenPanel is IHasChangeListeners {
settableWithChange S script;
settableWithChange bool animate;
event change;
transient Animation animation;
transient new G22Utils g22utils;
transient ImageSurface isInput;
transient JGazelleVScriptRunner scriptRunner;
void start {
scriptRunner = new JGazelleVScriptRunner(
liveValue_hasChangeListeners(this, S, -> script, x -> script = x));
isInput = g22utils.stdImageSurface();
// when test screen is visible, do the animation
awtEvery(isInput, 1000/20, r stepAnimation);
}
void stepAnimation {
if (!animate) ret;
if (animation == null) {
animation = new AnimatedLine;
animation.start();
}
animation.nextFrame();
var img = whiteImage(animation.w, animation.h);
animation.setGraphics(createGraphics(img));
animation.paint();
isInput?.setImage(img);
var ii = bwIntegralImage_withMeta(img);
scriptRunner.parseAndRunOn(ii);
}
visual centerAndSouthWithMargin(
hsplit(
northAndCenterWithMargin(centerAndEastWithMargin(
jlabel("Input"), liveValueCheckBox("Animate",
liveValue_hasChangeListeners(this, bool.class, -> animate, x -> animate(x))),
jscroll_centered_borderless(isInput)),
northAndCenterWithMargin(centerAndEastWithMargin(
jlabel("Output"), scriptRunner.lblScore),
scriptRunner.scpScriptResult)
),
scriptRunner.scriptInputField()
);
}