Warning: session_start(): open(/var/lib/php/sessions/sess_b8ccn839qjqkiq1td50ioslf36, 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
static Rect randomRect(int w, int h, Rect outer) {
ret translateRect(outer.x, outer.y, randomRect(w, h, 0, outer.w, outer.h));
}
static Rect randomRect(int w, int h, int border, int rw, int rh) {
if (rw > w-border*2 || rh > h-border*2) null;
ret new Rect(random(border, w-border-rw), random(border, h-border-rh), rw, rh);
}
static Rect randomRect(int w, int h) {
ret randomRect(w, h, 0, random(w), random(h));
}
ifclass RGBImage
static Rect randomRect(RGBImage img, int rw, int rh) {
ret randomRect(img.w(), img.h(), 0, rw, rh);
}
static Rect randomRect(RGBImage img) {
ret randomRect(img.w(), img.h());
}
endif
// on currentImage()
static Rect randomRect() {
ret randomRect(currentImage().getWidth(), currentImage().getHeight());
}
static Rect randomRect(BufferedImage img, int rw, int rh) {
ret randomRect(img.getWidth(), img.getHeight(), 0, rw, rh);
}