Warning: session_start(): open(/var/lib/php/sessions/sess_u073s6ij8eekn2m071sllit7vn, 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
interface IImageRegion
extends INumberOfPixels, IPixelSet {
// REQUIRED METHODS
// smallest rectangle that all of the region's pixels are contained in
public Rect bounds();
public ItIt pixelIterator();
public bool contains(int x, int y);
// OPTIONAL METHODS
// get whole image that the region refers to
public default Img image() { null; }
// which object made this
public default O creator() { null; }
public default int indexInCreator() { ret 0; }
// was diagonal walking enabled?
public default Bool createdWithDiagonals() { null; }
public default int numberOfPixels() { ret l(pixelIterator()); }
public default Pt firstPixel() { ret first(pixelIterator()); }
// gets the region's color (what exactly this means is defined
// by the creator of this object)
public default Color color() { null; }
public default int brightness() { ret -1; }
public default OnePathWithOrigin outline() {
ret g22_regionOutline(this);
}
default Image2B toImage2B() { ret new RegionToImage2B(this)!; }
int[] pixelsAsIntArray();
int nRegions();
}