Warning: session_start(): open(/var/lib/php/sessions/sess_8jdasgb7rnbh03336e3ie3dhje, 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 FillOnePath(OnePathWithOrigin path) {
settable bool rhsIsInside;
Rect r; // bounds
BitSet inBorder, inside;
run {
bounds = path.bounds();
int size = r.w*r.h;
inBorder = new BitSet(size);
inside = new BitSet(size);
Pt last = null;
for (Pt p : path.pointIterator()) {
int idx = (p.x-r.x)+(p.y-r.y)*r.w;
inBorder.set(idx);
if (last != null) {
int dx = p.x-last.x, dy = p.y-last.y;
if (dx == 0 && dy == 0) {}
else if (dy == 0)
setInside(rhsIsInside ? last.x+dx : last.y-dx, p.y);
else if (dx == 0)
setInside(p.x, rhsIsInside ? last.x-dx : last.x+dx);
else { // TODO }
last = p;
}
}
void setInside(int x, int y) {
if (!rectContains(r, x, y)) ret;
int idx = (x-r.x)+(y-r.y)*r.w;
inside.set(idx);
}
}