Enlarges margin in screen coordinates to given directions
@param bounds
@param dirs
768411
public void setMargin(Rectangle2D bounds, Direction... dirs)
    {
        for (Direction dir : dirs)
        {
            switch (dir)
            {
                case BOTTOM:
                    combinedTransform.transform(userBounds.getCenterX(), userBounds.getMinY(), (x,y)->
                    {
                        inverse.transform(x, y+bounds.getHeight(), this::updatePoint);
                    });
                    break;
                case LEFT:
                    combinedTransform.transform(userBounds.getMinX(), userBounds.getCenterY(), (x,y)->
                    {
                        inverse.transform(x-bounds.getWidth(), y, this::updatePoint);
                    });
                    break;
                case RIGHT:
                    combinedTransform.transform(userBounds.getMaxX(), userBounds.getCenterY(), (x,y)->
                    {
                        inverse.transform(x+bounds.getWidth(), y, this::updatePoint);
                    });
                    break;
                case TOP:
                    combinedTransform.transform(userBounds.getCenterX(), userBounds.getMaxY(), (x,y)->
                    {
                        inverse.transform(x, y-bounds.getHeight(), this::updatePoint);
                    });
                    break;
            }
        }
    }
1128168
function (bounds) {
        bounds = this.adjustBounds(bounds);
        var zoom = this.getZoom();
        var extent = this.map.getMaxExtent();
        var deg = this.lzd/Math.pow(2,this.getZoom());
        var x = Math.floor((bounds.left - extent.left)/deg);
        var y = Math.floor((bounds.bottom - extent.bottom)/deg);
        if (this.map.getResolution() <= (this.lzd/512)
            && this.getZoom() <= this.zoomLevels) {
            return this.getFullRequestString(
              { L: zoom, 
                X: x,
                Y: y
              });
        } else {
            return OpenLayers.Util.getImageLocation("blank.gif");
        }

    }
43647
protected void updateBoundingRects() {
		float maxX = startX[0];
		float minX = startX[0];
		float maxY = startY[0];
		float minY = startY[0];

		for (int i = 0; i < rayNum; i++) {
			maxX = maxX > startX[i] ? maxX : startX[i];
			maxX = maxX > mx[i] ? maxX : mx[i];
			minX = minX < startX[i] ? minX : startX[i];
			minX = minX < mx[i] ? minX : mx[i];
			maxY = maxY > startY[i] ? maxY : startY[i];
			maxY = maxY > my[i] ? maxY : my[i];
			minY = minY < startY[i] ? minY : startY[i];
			minY = minY < my[i] ? minY : my[i];
		}
		chainLightBounds.set(minX, minY, maxX - minX, maxY - minY);
		rayHandlerBounds.set(
			rayHandler.x1, rayHandler.y1,
			rayHandler.x2 - rayHandler.x1, rayHandler.y2 - rayHandler.y1);
	}
170425
public void setBoundingBox(BoundingBox boundingBox, Projection projection) {
        ProjectionTransform projectionToWebMercator = projection
                .getTransformation(ProjectionConstants.EPSG_WEB_MERCATOR);
        webMercatorBoundingBox = boundingBox
                .transform(projectionToWebMercator);
    }
906157
public void drawImage(Bbox bounds) {
		if (enabled) {
			mapWidget.getVectorContext().drawImage(group, getId(), icon.getHref(), bounds, icon.getStyle());
		} else {
			mapWidget.getVectorContext().drawImage(group, getId(), 
					makeDisabled(icon.getHref()), bounds, icon.getStyle());
		}
	}
1232314
public void updateBounds ()
    {
        // invalidate the old...
        invalidate();

        // size the bounds to fit our label
        Dimension size = _label.getSize();
        _bounds.width = size.width + PADDING*2 +
            (_style == ROUNDED ? _arcWidth : 0);
        _bounds.height = size.height + PADDING*2;

        // ...and the new
        invalidate();
    }
569257
public void updateBounds ()
    {
        Dimension size = _label.getSize();
        _bounds.width = size.width;
        _bounds.height = size.height;
    }
1113907
function updateBounds() {
         var target = this.getScreenCanvas();
         var rect;

         if (typeof target.getBoundingClientRect === "undefined") {
           rect = {
             left: 0,
             top: 0,
             width: 0,
             height: 0
           };
         } else {
           rect = target.getBoundingClientRect();
         }

         this.parentBounds.setShape(rect.left, rect.top, rect.width, rect.height);
       }
689254
def set_bounds(self, new_bounds):
        
        for row, key in enumerate(self.keys):
            if key in new_bounds:
                self._bounds[row] = new_bounds[key]
164358
private void offsetIcon(@NonNull Rect viewBounds) {
        float startX = viewBounds.centerX() - (mPathBounds.width() / 2);
        float offsetX = startX - mPathBounds.left;

        float startY = viewBounds.centerY() - (mPathBounds.height() / 2);
        float offsetY = startY - (mPathBounds.top);

        mPath.offset(offsetX + mIconOffsetX, offsetY + mIconOffsetY);
    }
190935
function (bounds, position, redraw) {
        if (redraw == null) {
            redraw = true;
        }

        this.setBounds(bounds);
        this.position = position.clone();
        if (redraw) {
            this.draw();
        }
    }
637455
private void calculateMinimapAreaBounds() {
        if (minimapBounds == null) {
            return;
        }

        if (zoom == 1f) {
            miniMapRequired = false;
        } else {
            // Calculates the bounds of the current displayed area
            float x = (-currentXOffset - toCurrentScale(currentFilteredPage * optimalPageWidth)) //
                    / toCurrentScale(optimalPageWidth) * minimapBounds.width();
            float width = getWidth() / toCurrentScale(optimalPageWidth) * minimapBounds.width();
            float y = -currentYOffset / toCurrentScale(optimalPageHeight) * minimapBounds.height();
            float height = getHeight() / toCurrentScale(optimalPageHeight) * minimapBounds.height();
            minimapScreenBounds = new RectF(minimapBounds.left + x, minimapBounds.top + y, //
                    minimapBounds.left + x + width, minimapBounds.top + y + height);
            minimapScreenBounds.intersect(minimapBounds);
            miniMapRequired = true;
        }
    }
760084
public final void moveInside(Rect bounds) {
	// check the right edge
	int distanceOffRightSide = (x + w) - (bounds.x + bounds.w);
	if (distanceOffRightSide > 0) {
	    x -= distanceOffRightSide;
	}
	// check the left edge (we prefer this to fit)
	int distanceOffLeftSide = bounds.x - x;
	if (distanceOffLeftSide > 0) {
	    x += distanceOffLeftSide;
	}

	// check the bottom edge
	int distanceOffBottom = (y + h) - (bounds.y + bounds.h);
	if (distanceOffBottom > 0) {
	    y -= distanceOffBottom;
	}
	// check the top edge (we prefer this to fit)
	int distanceOffTop = bounds.y - y;
	if (distanceOffTop > 0) {
	    y += distanceOffTop;
	}	
    }
1286293
public void getBounds(Rect bounds) {
        final int r = (int) Math.ceil(mTargetRadius);
        bounds.set(-r, -r, r, r);
    }
624259
public void setBounds(org.kie.dmn.model.api.dmndi.Bounds value) {
        this.bounds = value;
    }
485235
public Bbox applyMargins(Bbox bounds) {
		Bbox applied = (Bbox) bounds.clone();
		Coordinate c = getUpperLeftCorner();
		Double x = c.getX();
		Double y = c.getY();
		if (null != group && group instanceof MapAddon && group != this) {
			Coordinate pc = ((MapAddon) group).getUpperLeftCorner();
			x += pc.getX();
			y += pc.getY();
		}
		applied.setX(x + applied.getX());
		applied.setY(y + applied.getY());
		return applied;
	}
131114
public boolean isInsideBounds(int x, int y)
	{
		if (!isVisible())
			return false;
		int sx = screenPosition().x();
		int sy = screenPosition().y();
		return x >= sx && x <= sx + size().width() && y >= sy && y <= sy + size().height();
	}