Sets the rect for this node, ensuring that the width and height \
        meet the minimum requirements.
        
        :param      rect        <QRectF>
431663
def setRect( self, rect ):
        
        mwidth  = self.minimumWidth()
        mheight = self.minimumHeight()
        
        if ( rect.width() < mwidth ):
            rect.setWidth(mwidth)
        if ( rect.height() < mheight ):
            rect.setHeight(mheight)
        
        return super(XNode, self).setRect(rect)
525506
def add_rect(img, box, color=None, thickness=1):
    
    if color is None:
        color = COL_GRAY

    box = box.to_int()
    cv.rectangle(img, box.top_left(), box.bottom_right(), color, thickness)
592769
def setSceneRect(self, *args):
        
        curr = self.sceneRect()
        
        super(XGanttScene, self).setSceneRect(*args)
        
        if curr != QRectF(*args):
            self._dirty = True
534236
def rect(self):
        """"""
        CheckParent(self)

        val = _fitz.Annot_rect(self)
        val = Rect(val)

        return val
1341044
function rectToPoints (rect) {
  const rectPoints = {
    topLeft: {
      x: rect.left,
      y: rect.top
    },
    bottomRight: {
      x: rect.left + rect.width,
      y: rect.top + rect.height
    }
  };

  return rectPoints;
}
17442
def console_rect(
    con: tcod.console.Console,
    x: int,
    y: int,
    w: int,
    h: int,
    clr: bool,
    flag: int = BKGND_DEFAULT,
) -> None:
    
    lib.TCOD_console_rect(_console(con), x, y, w, h, clr, flag)
1270341
public void setArc (IRectangle rect, double start, double extent, int type) {
        setArc(rect.x(), rect.y(), rect.width(), rect.height(), start, extent, type);
    }
449468
public void initSize(Rectangle rectangle) {
		template = writer.getDirectContent().createTemplate(rectangle.getWidth(), rectangle.getHeight());
	}
659578
public void setFrame (IRectangle r) {
        setFrame(r.x(), r.y(), r.width(), r.height());
    }
154220
function(rectangle) {
        var topLeft = this.viewport.pixelFromPointNoRotate(rectangle.getTopLeft(), true);
        var size = this.viewport.deltaPixelsFromPointsNoRotate(rectangle.getSize(), true);

        return new $.Rect(
            topLeft.x * $.pixelDensityRatio,
            topLeft.y * $.pixelDensityRatio,
            size.x * $.pixelDensityRatio,
            size.y * $.pixelDensityRatio
        );
    }
1125575
def rect(self, x, y, width, height, color, *, fill=False):
        """"""
        # pylint: disable=too-many-arguments
        if self.rotation == 1:
            x, y = y, x
            width, height = height, width
            x = self.width - x - width
        if self.rotation == 2:
            x = self.width - x - width
            y = self.height - y - height
        if self.rotation == 3:
            x, y = y, x
            width, height = height, width
            y = self.height - y - height

        # pylint: disable=too-many-boolean-expressions
        if width < 1 or height < 1 or (x + width) <= 0 or (y + height) <= 0 or \
                y >= self.height or x >= self.width:
            return
        x_end = min(self.width-1, x + width-1)
        y_end = min(self.height-1, y + height-1)
        x = max(x, 0)
        y = max(y, 0)
        if fill:
            self.format.fill_rect(self, x, y, x_end-x+1, y_end-y+1, color)
        else:
            self.format.fill_rect(self, x, y, x_end-x+1, 1, color)
            self.format.fill_rect(self, x, y, 1, y_end-y+1, color)
            self.format.fill_rect(self, x, y_end, x_end-x+1, 1, color)
            self.format.fill_rect(self, x_end, y, 1, y_end-y+1, color)
269763
def pan(self, *pan):
        
        if len(pan) == 1:
            pan = pan[0]
        self.rect = self.rect + pan
1175564
def SetClientRect(self, rect):
        

        panel_posx = rect[0] + self.grid.GetRowLabelSize()
        panel_posy = rect[1] + self.grid.GetColLabelSize()

        panel_scrolled_pos = self.grid.CalcScrolledPosition(panel_posx,
                                                            panel_posy)
        # If the scrolled position is inside the grid labels then hide
        self.SetPosition(panel_scrolled_pos)
        wx.Panel.SetClientRect(self, wx.Rect(0, 0, rect[2], rect[3]))

        # Handle videos that are partly visible or that become invisible
        row_label_size = self.grid.GetRowLabelSize()
        col_label_size = self.grid.GetColLabelSize()

        if panel_scrolled_pos[0] < row_label_size or \
           panel_scrolled_pos[1] < col_label_size:
            self.Hide()
        else:
            self.Show()
345553
def _as_parameter_(self):
        
        return RECT(self.left, self.top, self.right, self.bottom)
1373749
public synchronized void setManualFramingRect(int width, int height) {
    if (initialized) {
      Point screenResolution = configManager.getScreenResolution();
      if (width > screenResolution.x) {
        width = screenResolution.x;
      }
      if (height > screenResolution.y) {
        height = screenResolution.y;
      }
      int leftOffset = (screenResolution.x - width) / 2;
      int topOffset = (screenResolution.y - height) / 2;
      framingRect = new Rect(leftOffset, topOffset, leftOffset + width, topOffset + height);
      Log.d(TAG, "Calculated manual framing rect: " + framingRect);
      framingRectInPreview = null;
    } else {
      requestedFramingRectWidth = width;
      requestedFramingRectHeight = height;
    }
  }
1139981
public void moveRectangleTo(Rectangle rect, float x, float y) {
		float width = rect.getWidth();
		float height = rect.getHeight();
		rect.setLeft(x);
		rect.setBottom(y);
		rect.setRight(rect.getLeft() + width);
		rect.setTop(rect.getBottom() + height);
	}
599951
public void addDirtyRegion (Rectangle rect)
    {
        // make sure we're on an AWT thread
        if (!EventQueue.isDispatchThread()) {
            log.warning("Oi! Region dirtied on non-AWT thread", "rect", rect, new Exception());
        }

        // sanity check
        if (rect == null) {
            log.warning("Attempt to dirty a null rect!?", new Exception());
            return;
        }

        // more sanity checking
        long x = rect.x, y = rect.y;
        if ((Math.abs(x) > Integer.MAX_VALUE/2) || (Math.abs(y) > Integer.MAX_VALUE/2)) {
            log.warning("Requested to dirty questionable region", "rect", rect, new Exception());
            return; // Let's not do it!
        }

        if (isValidSize(rect.width, rect.height)) {
            // Log.info("Invalidating " + StringUtil.toString(rect));
            _dirty.add(rect);
        }
    }