+ [task#127424] add comments of findRegions function.
This commit is contained in:
@@ -129,10 +129,21 @@ function getRegionInfo(pixels, visited, x, y, width, height)
|
||||
return region;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查找区域。
|
||||
* Find regions.
|
||||
*
|
||||
* @param object pixels
|
||||
* @param number width
|
||||
* @param number height
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
function findRegions(pixels, width, height)
|
||||
{
|
||||
const visited = {};
|
||||
const regions = [];
|
||||
|
||||
for(let y = 0; y < height; y++)
|
||||
{
|
||||
for(let x = 0; x < width; x++)
|
||||
|
||||
Reference in New Issue
Block a user