B2G/gecko/toolkit/content/tests/fennec-tile-testapp/chrome/content/TileManager.js
/**
   * Fetch all tiles that share at least one point with this rect.  If `create'
   * is true then any tileless tileholders will have tiles created for them.
   */
Fetch all tiles that share at least one point with this rect.  If `create'
is true then any tileless tileholders will have tiles created for them.
Fetch all tiles that share at least one point with this rect . If ` create ' is true then any tileless tileholders will have tiles created for them .
function tilesIntersectingRect(rect, create) {
    let dx = (rect.right % kTileWidth) - (rect.left % kTileWidth);
    let dy = (rect.bottom % kTileHeight) - (rect.top % kTileHeight);
    let tiles = [];
    for (let y = rect.top; y <= rect.bottom - dy; y += kTileHeight) {
      for (let x = rect.left; x <= rect.right - dx; x += kTileWidth) {
        let tile = this.tileFromPoint(x, y, create);
        if (tile)
          tiles.push(tile);
      }
    }
    return tiles;
  }
function tilesIntersectingRect ( rect , create ) { let dx = ( rect . right % kTileWidth ) - ( rect . left % kTileWidth ) ; let dy = ( rect . bottom % kTileHeight ) - ( rect . top % kTileHeight ) ; let tiles = [ ] ; for ( let y = rect . top ; y <= rect . bottom - dy ; y += kTileHeight ) { for ( let x = rect . left ; x <= rect . right - dx ; x += kTileWidth ) { let tile = this . tileFromPoint ( x , y , create ) ; if ( tile ) tiles . push ( tile ) ; } } return tiles ; }
Fetch all tiles that share at least one point with this rect.
Fetch all tiles that share at least one point with this rect .