Fills the specified rectangle.
335368
public Surface fillRect (float x, float y, float width, float height) {
    if (patternTex != null) {
      batch.addQuad(patternTex, tint, tx(), x, y, width, height);
    } else {
      batch.addQuad(colorTex, Tint.combine(fillColor, tint), tx(), x, y, width, height);
    }
    return this;
  }
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)
381322
public Rectangle toRelative(Rectangle rect) {
		return new Rectangle(rect.getLeft() - origX, rect.getBottom() - origY, rect.getRight() - origX, rect.getTop()
				- origY);
	}
927582
def fill(self, **kwargs):
        '''  '''
        setattr(self.obj, self.name, self.get(**kwargs))
455922
public void paint(Graphics g, int p0, int p1, Shape bounds, JTextComponent c)
	{
		try
		{
			Rectangle r = c.modelToView(c.getCaretPosition());
			g.setColor( color );
			g.fillRect(0, r.y, c.getWidth(), r.height);

			if (lastView == null)
				lastView = r;
		}
		catch(BadLocationException ble) {System.out.println(ble);}
	}
166782
protected void fill(ZoomableGraphicsContext gc, T element) {
		final double radius = element.getRadius();
		final double diameter = radius * radius;
		final double minx = element.getX() - radius;
		final double miny = element.getY() - radius;
		gc.fillOval(minx, miny, diameter, diameter);
	}
1144791
protected void repaint(int t)
    {
        if (container != null)
        {
            Rectangle bounds = owner.getAbsoluteBounds();
            container.repaint(t, bounds.x, bounds.y, bounds.width, bounds.height);
        }
    }
727954
def rectangle(upper_left_x, upper_left_y, lower_right_x, lower_right_y)
      primitive 'rectangle ' + format('%g,%g %g,%g',
                                      upper_left_x, upper_left_y, lower_right_x, lower_right_y)
    end
1012769
public void fill(Graphics2D g, Shape s) {
        Rectangle bounds = s.getBounds();
        int       width  = bounds.width;
        int       height = bounds.height;

        BufferedImage bimage = Effect.createBufferedImage(width, height, true);
        Graphics2D    gbi    = bimage.createGraphics();

        gbi.setColor(Color.BLACK);
        gbi.fill(s);

        g.drawImage(applyEffect(bimage, null, width, height), 0, 0, null);
    }
845771
function inflate(rect, w, h) {
      return create(rect.x - w, rect.y - h, rect.w + w * 2, rect.h + h * 2);
    }
578273
public final void setRect(double xMin, double xMax, double yMin, double yMax)
    {
        setRect(new Rectangle2D.Double(xMin, yMin, xMax-xMin, yMax-yMin));
    }
226857
public void fillEllipse(Rectangle rect, Color color) {
		template.saveState();
		setFill(color);
		template.ellipse(origX + rect.getLeft(), origY + rect.getBottom(), origX + rect.getRight(),
				origY + rect.getTop());
		template.fill();
		template.restoreState();
	}
87745
function fillGridAt(x, y, drawMask, dimension, item) {
      if (x >= ngx || y >= ngy || x < 0 || y < 0) {
        return;
      }

      grid[x][y] = false;

      if (drawMask) {
        var ctx = elements[0].getContext('2d');
        ctx.fillRect(x * g, y * g, maskRectWidth, maskRectWidth);
      }

      if (interactive) {
        infoGrid[x][y] = { item: item, dimension: dimension };
      }
    }
301745
public void fillRect(float x1, float y1, float width, float height) {
		predraw();
		TextureImpl.bindNone();
		currentColor.bind();

		GL.glBegin(SGL.GL_QUADS);
		GL.glVertex2f(x1, y1);
		GL.glVertex2f(x1 + width, y1);
		GL.glVertex2f(x1 + width, y1 + height);
		GL.glVertex2f(x1, y1 + height);
		GL.glEnd();
		postdraw();
	}
139408
public void fill(IntBiPredicate isInside, int replacement)
    {
        fill(0, 0, width, height, isInside, (x,y)->replacement);
    }
551839
def round_rectangle(self, style, fill, x1, y1, x2, y2, radius, shadow=None):
        """"""

        if invisible_p(x2, y2):
            return
        self.setbb(x1, y1)
        self.setbb(x2, y2)

        if fill:
            if shadow:
                x_off, y_off, shadow_fill = shadow
                self.gsave()
                self.newpath()
                self._path_round_rectangle(x1 + x_off, y1 + y_off, x2 + x_off, y2 + y_off,
                                           radius)
                self.closepath()
                self.clip_sub()
                self.fill_with_pattern(shadow_fill, x1 + x_off, y1 + y_off,
                                       x2 + x_off, y2 + y_off)
                self.grestore()

            self.gsave()
            self.newpath()
            self._path_round_rectangle(x1, y1, x2, y2, radius)
            self.closepath()
            self.clip_sub()
            self.fill_with_pattern(fill, x1, y1, x2, y2)
            self.grestore()
        if style:
            self.set_line_style(style)
            self.newpath()
            self._path_round_rectangle(x1, y1, x2, y2, radius)
            self.closepath()
            self.stroke()
1268527
def insert(self, rectangle):
        
        rectangle = np.asanyarray(rectangle, dtype=np.float64)

        for child in self.child:
            if child is not None:
                attempt = child.insert(rectangle)
                if attempt is not None:
                    return attempt

        if self.occupied:
            return None

        # compare the bin size to the insertion candidate size
        size_test = self.extents - rectangle

        # this means the inserted rectangle is too big for the cell
        if np.any(size_test < -tol.zero):
            return None

        # since the cell is big enough for the current rectangle, either it
        # is going to be inserted here, or the cell is going to be split
        # either way, the cell is now occupied.
        self.occupied = True

        # this means the inserted rectangle fits perfectly
        # since we already checked to see if it was negative, no abs is needed
        if np.all(size_test < tol.zero):
            return self.bounds[0:2]

        # since the rectangle fits but the empty space is too big,
        # we need to create some children to insert into
        # first, we decide which way to split
        vertical = size_test[0] > size_test[1]
        length = rectangle[int(not vertical)]
        child_bounds = self.split(length, vertical)

        self.child[0] = RectangleBin(bounds=child_bounds[0])
        self.child[1] = RectangleBin(bounds=child_bounds[1])

        return self.child[0].insert(rectangle)