Warning: session_start(): open(/var/lib/php/sessions/sess_5b9n9ki73bpoj2192u9t6itb3a, 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
!7
cm LetterboxOnScreen2 > DynPrintLogAndEnabled {
switchable double interval = 5.0; // 5 fps
transient Map alwaysOnTopWindows = syncMap();
void cleanMeUp_windows {
disposeWindows(getValuesAndClear(alwaysOnTopWindows));
}
start {
dm_reloadOnFieldChange interval();
dm_doEvery(interval, r doIt);
}
void doIt {
if (!enabled) ret;
var rect = screenBounds(1);
if (rect == null) ret;
var img = shootScreen2(rect);
var ii = IntegralImage(img);
new Var theBox;
stepAllWithStats(new ULetterbox1().run(img, setVarWithConversion toRect(theBox)));
print(imageBounds(img) + " - " + theBox!);
//showImageWithSelection(img, theBox!);
var box1 = rect(rect.x, rect.y, rect.w, theBox->y);
var box2 = rectFromPoints(rect.x, rect.y+theBox->y2(), rect.x2(), rect.y+theBox->y2());
printVars(+box1, +box2);
positionMarkerWindow(0, box1, withAlpha(.2, Color.green));
positionMarkerWindow(1, box2, withAlpha(.2, Color.green));
}
JWindow getOrCreateMarkerWindow(O key) {
ret swing(() ->
syncMapGetOrCreate(alwaysOnTopWindows, key,
() -> makeAlwaysOnTopTranslucentWindow()));
}
void positionMarkerWindow(int iWindow, Rect box, Color color) {
awt {
JWindow w = getOrCreateMarkerWindow(iWindow);
setBounds(w, box);
w.setBackground(color);
w.setVisible(true);
}
}
}