return the bounding rect for this map renderer
@name me.TMXHexagonalRenderer#getBounds
@public
@function
@param {me.TMXLayer} [layer] calculate the bounding rect for a specific layer (will return a new bounds object)
@return {me.Rect}
490111
function (layer) {
            var bounds = layer instanceof me.TMXLayer ? me.pool.pull("me.Rect", 0, 0, 0, 0) : this.bounds;

            // origin is always 0 for finite maps
            bounds.pos.set(0, 0);
            // The map size is the same regardless of which indexes are shifted.
            if (this.staggerX) {
                bounds.resize(
                    this.cols * this.columnwidth + this.sideoffsetx,
                    this.rows * (this.tileheight + this.sidelengthy)
                );
                if (bounds.width > 1) {
                    bounds.height += this.rowheight;
                }
            } else {
                bounds.resize(
                    this.cols * (this.tilewidth + this.sidelengthx),
                    this.rows * this.rowheight + this.sideoffsety
                );
                if (bounds.height > 1) {
                    bounds.width += this.columnwidth;
                }
            }
            return bounds;
        }
961655
function() {
        const bounds = this._pixelBounds();
        const pixelSize = (bounds.max.x - bounds.min.x) / this._field.nCols;

        var stride = Math.max(
            1,
            Math.floor(1.2 * this.options.vectorSize / pixelSize)
        );

        const ctx = this._getDrawingContext();
        ctx.strokeStyle = this.options.color;

        var currentBounds = this._map.getBounds();

        for (var y = 0; y < this._field.height; y = y + stride) {
            for (var x = 0; x < this._field.width; x = x + stride) {
                let [lon, lat] = this._field._lonLatAtIndexes(x, y);
                let v = this._field.valueAt(lon, lat);
                let center = L.latLng(lat, lon);
                if (v !== null && currentBounds.contains(center)) {
                    let cell = new Cell(
                        center,
                        v,
                        this.cellXSize,
                        this.cellYSize
                    );
                    this._drawArrow(cell, ctx);
                }
            }
        }
    }
1140136
function updateBoundsPos(x, y) {
         if (typeof this.body !== "undefined") {
           var _pos = this.body.pos;

           this._super(me.Renderable, "updateBoundsPos", [x + _pos.x, y + _pos.y]);
         } else {
           this._super(me.Renderable, "updateBoundsPos", [x, y]);
         }

         return this.getBounds();
       }
340799
function getOffset(el) {
  var rect = el.getBoundingClientRect();
  var scroll = getScroll();
  return {
    x: rect.left + scroll.left,
    y: rect.top + scroll.top
  };
}
1219586
function(bounds, x, y)
	{
		return (bounds.x <= x && bounds.x + bounds.width >= x &&
				bounds.y <= y && bounds.y + bounds.height >= y);
	}
55977
function GridBounds(bounds) {
  // [sw, ne]

  this.minX = Math.min(bounds[0].x, bounds[1].x);
  this.maxX = Math.max(bounds[0].x, bounds[1].x);
  this.minY = Math.min(bounds[0].y, bounds[1].y);
  this.maxY = Math.max(bounds[0].y, bounds[1].y);

}
710326
function(pxBounds) {
        var top = Math.max(pxBounds.top, 0);
        var left = Math.max(pxBounds.left, 0);
        var bottom = Math.min(pxBounds.top + Math.abs(pxBounds.getHeight()),
                              this.ovmap.size.h - this.hComp);
        var right = Math.min(pxBounds.left + pxBounds.getWidth(),
                             this.ovmap.size.w - this.wComp);
        var width = Math.max(right - left, 0);
        var height = Math.max(bottom - top, 0);
        if(width < this.minRectSize || height < this.minRectSize) {
            this.extentRectangle.className = this.displayClass +
                                             this.minRectDisplayClass;
            var rLeft = left + (width / 2) - (this.minRectSize / 2);
            var rTop = top + (height / 2) - (this.minRectSize / 2);
            this.extentRectangle.style.top = Math.round(rTop) + 'px';
            this.extentRectangle.style.left = Math.round(rLeft) + 'px';
            this.extentRectangle.style.height = this.minRectSize + 'px';
            this.extentRectangle.style.width = this.minRectSize + 'px';
        } else {
            this.extentRectangle.className = this.displayClass +
                                             'ExtentRectangle';
            this.extentRectangle.style.top = Math.round(top) + 'px';
            this.extentRectangle.style.left = Math.round(left) + 'px';
            this.extentRectangle.style.height = Math.round(height) + 'px';
            this.extentRectangle.style.width = Math.round(width) + 'px';
        }
        this.rectPxBounds = new OpenLayers.Bounds(
            Math.round(left), Math.round(bottom),
            Math.round(right), Math.round(top)
        );
    }
234913
def boundingRect( self ):
        
        rect = super(XNode, self).boundingRect()
        
        pad = self.highlightPadding()
        x = rect.x() - pad / 2.0
        y = rect.y() - pad / 2.0
        w = rect.width() + pad
        h = rect.height() + pad
        
        return QRectF( x, y, w, h )
128432
def get_bounds(self):
        
        if not self.embed:
            raise ValueError('Cannot compute bounds of non-embedded TopoJSON.')

        xmin, xmax, ymin, ymax = None, None, None, None

        for arc in self.data['arcs']:
            x, y = 0, 0
            for dx, dy in arc:
                x += dx
                y += dy
                xmin = none_min(x, xmin)
                xmax = none_max(x, xmax)
                ymin = none_min(y, ymin)
                ymax = none_max(y, ymax)
        return [
            [
                self.data['transform']['translate'][1] + self.data['transform']['scale'][1] * ymin,  # noqa
                self.data['transform']['translate'][0] + self.data['transform']['scale'][0] * xmin  # noqa
            ],
            [
                self.data['transform']['translate'][1] + self.data['transform']['scale'][1] * ymax,  # noqa
                self.data['transform']['translate'][0] + self.data['transform']['scale'][0] * xmax  # noqa
            ]
        ]
225864
function(el) {
        // Return a bounding box rectangle that takes into account stroke.
        // Note that this is a naive and ad-hoc implementation that does not
        // works only in certain cases and should be replaced as soon as browsers will
        // start supporting the getStrokeBBox() SVG method.
        // @TODO any better solution is very welcome!

        var isMagnet = !!el;

        el = el || this.el;
        var bbox = V(el).getBBox({ target: this.paper.viewport });
        var strokeWidth;
        if (isMagnet) {

            strokeWidth = V(el).attr('stroke-width');

        } else {

            strokeWidth = this.model.attr('rect/stroke-width') || this.model.attr('circle/stroke-width') || this.model.attr('ellipse/stroke-width') || this.model.attr('path/stroke-width');
        }

        strokeWidth = parseFloat(strokeWidth) || 0;

        return g.rect(bbox).moveAndExpand({ x: -strokeWidth / 2, y: -strokeWidth / 2, width: strokeWidth, height: strokeWidth });
    }
851735
function (target) {
            var a = this.getBounds();
            var dx, dy;

            if (target instanceof me.Renderable) {
                var b = target.getBounds();
                dx = a.centerX - b.centerX;
                dy = a.centerY - b.centerY;
            } else { // vector object
                dx = a.centerX - target.x;
                dy = a.centerY - target.y;
            }

            return Math.sqrt(dx * dx + dy * dy);
        }
1301129
function drawTileLayer(renderer, layer, rect) {
         // get top-left and bottom-right tile position
         var start = this.pixelToTileCoords(rect.pos.x, rect.pos.y, me.pool.pull("me.Vector2d")).floorSelf();
         var end = this.pixelToTileCoords(rect.pos.x + rect.width + this.tilewidth, rect.pos.y + rect.height + this.tileheight, me.pool.pull("me.Vector2d")).ceilSelf(); //ensure we are in the valid tile range

         start.x = start.x < 0 ? 0 : start.x;
         start.y = start.y < 0 ? 0 : start.y;
         end.x = end.x > this.cols ? this.cols : end.x;
         end.y = end.y > this.rows ? this.rows : end.y; // main drawing loop

         for (var y = start.y; y < end.y; y++) {
           for (var x = start.x; x < end.x; x++) {
             var tmxTile = layer.layerData[x][y];

             if (tmxTile) {
               this.drawTile(renderer, x, y, tmxTile);
             }
           }
         }

         me.pool.push(start);
         me.pool.push(end);
       }
1172184
function getBoundingRect(el) {
    const clientRect = el.getBoundingClientRect();
    const bound = {
      left: clientRect.left,
      top: clientRect.top,
      width: clientRect.width,
      height: clientRect.height
    };

    let frame = el.ownerDocument.defaultView.frameElement;
    while (frame) {
      const frameBound = frame.getBoundingClientRect();
      // This computation doesn't account for more complex CSS transforms on the
      // frame (e.g. scaling or rotations).
      bound.left += frameBound.left;
      bound.top += frameBound.top;

      frame = frame.ownerDocument.frameElement;
    }
    return bound;
  }
308725
function (renderer, layer, rect) {
            var incX = 1, incY = 1;

            // get top-left and bottom-right tile position
            var start = this.pixelToTileCoords(
                Math.max(rect.pos.x - (layer.maxTileSize.width - layer.tilewidth), 0),
                Math.max(rect.pos.y - (layer.maxTileSize.height - layer.tileheight), 0),
                me.pool.pull("me.Vector2d")
            ).floorSelf();

            var end = this.pixelToTileCoords(
                rect.pos.x + rect.width + this.tilewidth,
                rect.pos.y + rect.height + this.tileheight,
                me.pool.pull("me.Vector2d")
            ).ceilSelf();

            //ensure we are in the valid tile range
            end.x = end.x > this.cols ? this.cols : end.x;
            end.y = end.y > this.rows ? this.rows : end.y;

            switch (layer.renderorder) {
                case "right-up" :
                    // swapping start.y and end.y
                    end.y = start.y + (start.y = end.y) - end.y;
                    incY = -1;
                    break;
                case "left-down" :
                    // swapping start.x and end.x
                    end.x = start.x + (start.x = end.x) - end.x;
                    incX = -1;
                    break;
                case "left-up" :
                    // swapping start.x and end.x
                    end.x = start.x + (start.x = end.x) - end.x;
                    // swapping start.y and end.y
                    end.y = start.y + (start.y = end.y) - end.y;
                    incX = -1;
                    incY = -1;
                    break;
                default: // right-down
                    break;
            }

            // main drawing loop
            for (var y = start.y; y !== end.y; y+= incY) {
                for (var x = start.x; x !== end.x; x+= incX) {
                    var tmxTile = layer.layerData[x][y];
                    if (tmxTile) {
                        this.drawTile(renderer, x, y, tmxTile);
                    }
                }
            }

            me.pool.push(start);
            me.pool.push(end);
        }
362881
function(rect) {
        var minX = rect.origin.x,
            maxX = minX + rect.extent.x;
        var minY = rect.origin.y,
            maxY = minY + rect.extent.y;

        if (rect.extent.x < 0) {
            minX = maxX;
            maxX = rect.origin.x;
        }

        if (rect.extent.y < 0) {
            minY = maxY;
            maxY = rect.origin.y;
        }

        return (
            minX <= this.x && this.x < maxX &&
            minY <= this.y && this.y < maxY
        );
    }
91412
function (x, y, width, height) {
        this._rect = new BoundingRect(x, y, width, height);
        return this._rect;
    }
191141
function() {
        var lonLatBounds = this.getMapBoundsFromRectBounds(this.rectPxBounds);
        if (this.ovmap.getProjection() != this.map.getProjection()) {
            lonLatBounds = lonLatBounds.transform(
                this.ovmap.getProjectionObject(),
                this.map.getProjectionObject() );
        }
        this.map.panTo(lonLatBounds.getCenterLonLat());
    }