Define a clipping rectangle. In VML it is accomplished by storing the values
for setting the CSS style to all associated members.

@param {Number} x
@param {Number} y
@param {Number} width
@param {Number} height
355446
function (x, y, width, height) {

		// create a dummy element
		var clipRect = this.createElement();

		// mimic a rectangle with its style object for automatic updating in attr
		return extend(clipRect, {
			members: [],
			left: x,
			top: y,
			width: width,
			height: height,
			getCSS: function (inverted) {
				var rect = this,//clipRect.element.style,
					top = rect.top,
					left = rect.left,
					right = left + rect.width,
					bottom = top + rect.height,
					ret = {
						clip: 'rect(' +
							mathRound(inverted ? left : top) + 'px,' +
							mathRound(inverted ? bottom : right) + 'px,' +
							mathRound(inverted ? right : bottom) + 'px,' +
							mathRound(inverted ? top : left) + 'px)'
					};

				// issue 74 workaround
				if (!inverted && docMode8) {
					extend(ret, {
						width: right + PX,
						height: bottom + PX
					});
				}
				return ret;
			},

			// used in attr and animation to update the clipping of all members
			updateClipping: function () {
				each(clipRect.members, function (member) {
					member.css(clipRect.getCSS(member.inverted));
				});
			}
		});

	}
1112879
function (x, y, width, height) {
            var points = this._glPoints;
            points[0].x = x;
            points[0].y = y;
            points[1].x = x + width;
            points[1].y = y;
            points[2].x = x + width;
            points[2].y = y + height;
            points[3].x = x;
            points[3].y = y + height;
            this.compositor.drawLine(points, 4);
        }
106861
public void setScrollableArea (int x, int y, int width, int height)
    {
        Rectangle vb = _panel.getViewBounds();
        int hmax = x + width, vmax = y + height, value;

        if (width > vb.width) {
            value = MathUtil.bound(x, _hrange.getValue(), hmax - vb.width);
            _hrange.setRangeProperties(value, vb.width, x, hmax, false);
        } else {
            // Let's center it and lock it down.
            int newx = x - (vb.width - width)/2;
            _hrange.setRangeProperties(newx, 0, newx, newx, false);
        }
        if (height > vb.height) {
            value = MathUtil.bound(y, _vrange.getValue(), vmax - vb.height);
            _vrange.setRangeProperties(value, vb.height, y, vmax, false);
        } else {
            // Let's center it and lock it down.
            int newy = y - (vb.height - height)/2;
            _vrange.setRangeProperties(newy, 0, newy, newy, false);
        }
    }
951362
def draw_rectangle(x, y, width, height)
      @context.drawRect(x, y, width, height)
    end
729903
public void clip() {
        int x = (int) (projection.canvas.getWidth() * projection.canvas.margin);
        int y = (int) (projection.canvas.getHeight() * projection.canvas.margin);
        int w = (int) (projection.canvas.getWidth() * (1 - 2 * projection.canvas.margin));
        int h = (int) (projection.canvas.getHeight() * (1 - 2 * projection.canvas.margin));
        originalClip = g2d.getClip();
        g2d.clipRect(x, y, w, h);
    }
483652
function() {
        var heightSegments = this.heightSegments;
        var widthSegments = this.widthSegments;
        var attributes = this.attributes;
        var positions = [];
        var texcoords = [];
        var normals = [];
        var faces = [];

        for (var y = 0; y <= heightSegments; y++) {
            var t = y / heightSegments;
            for (var x = 0; x <= widthSegments; x++) {
                var s = x / widthSegments;

                positions.push([2 * s - 1, 2 * t - 1, 0]);
                if (texcoords) {
                    texcoords.push([s, t]);
                }
                if (normals) {
                    normals.push([0, 0, 1]);
                }
                if (x < widthSegments && y < heightSegments) {
                    var i = x + y * (widthSegments + 1);
                    faces.push([i, i + 1, i + widthSegments + 1]);
                    faces.push([i + widthSegments + 1, i + 1, i + widthSegments + 2]);
                }
            }
        }

        attributes.position.fromArray(positions);
        attributes.texcoord0.fromArray(texcoords);
        attributes.normal.fromArray(normals);

        this.initIndicesFromArray(faces);

        this.boundingBox = new BoundingBox();
        this.boundingBox.min.set(-1, -1, 0);
        this.boundingBox.max.set(1, 1, 0);
    }
702596
private Box makeViewPort(Length x, Length y, Length width, Length height)
   {
      float  _x = (x != null) ? x.floatValueX(this) : 0f;
      float  _y = (y != null) ? y.floatValueY(this) : 0f;

      Box viewPortUser = getCurrentViewPortInUserUnits();
      float  _w = (width != null) ? width.floatValueX(this) : viewPortUser.width;  // default 100%
      float  _h = (height != null) ? height.floatValueY(this) : viewPortUser.height;

      return new Box(_x, _y, _w, _h);
   }
60246
function(width, height) {
            this.width = width;
            this.height = height;
            for (var i = 0; i < this.width; i++) {
                if(!this.data){
                    this.data = [];
                }

                if(this.data[i] === void 0){
                    this.data[i] = [];
                }
            }
        }
431704
public void set(int x, int y, int width, int height) {
        setPosition(x, y);
        setSize(width, height);
    }
1148721
function verticalBarsTween(d) {
            let node = d3Selection.select(this),
                i = d3Interpolate.interpolateRound(0, chartHeight - yScale(getValue(d))),
                y = d3Interpolate.interpolateRound(chartHeight, yScale(getValue(d))),
                j = d3Interpolate.interpolateNumber(0, 1);

            return function (t) {
                node.attr('y', y(t))
                    .attr('height', i(t)).style('opacity', j(t));
            }
        }
740199
private void checkForClipPath_OldStyle(SvgElement obj, Box boundingBox)
   {
      // Use the old/original method for clip paths

      // Locate the referenced object
      SvgObject  ref = obj.document.resolveIRI(state.style.clipPath);
      if (ref == null) {
         error("ClipPath reference '%s' not found", state.style.clipPath);
         return;
      }

      ClipPath clipPath = (ClipPath) ref;

      // An empty clipping path will completely clip away the element (sect 14.3.5).
      if (clipPath.children.isEmpty()) {
         canvas.clipRect(0, 0, 0, 0);
         return;
      }

      boolean  userUnits = (clipPath.clipPathUnitsAreUser == null || clipPath.clipPathUnitsAreUser);

      if ((obj instanceof SVG.Group) && !userUnits) {
         warn("<clipPath clipPathUnits=\"objectBoundingBox\"> is not supported when referenced from container elements (like %s)", obj.getNodeName());
         return;
      }

      clipStatePush();

      if (!userUnits)
      {
         Matrix m = new Matrix();
         m.preTranslate(boundingBox.minX, boundingBox.minY);
         m.preScale(boundingBox.width, boundingBox.height);
         canvas.concat(m);
      }
      if (clipPath.transform != null)
      {
         canvas.concat(clipPath.transform);
      }

      // "Properties inherit into the <clipPath> element from its ancestors; properties do not
      // inherit from the element referencing the <clipPath> element." (sect 14.3.5)
      state = findInheritFromAncestorState(clipPath);

      checkForClipPath(clipPath);

      Path combinedPath = new Path();
      for (SvgObject child: clipPath.children)
      {
         addObjectToClip(child, true, combinedPath, new Matrix());
      }
      canvas.clipPath(combinedPath);

      clipStatePop();
   }
669753
function (width, height) {
        this._lightAccumTex.width = width;
        this._lightAccumTex.height = height;

        // PENDING viewport ?
        this._gBuffer.resize(width, height);
    }
89967
function(width, height){
            this.map.setSize(width, height);
            var map = this.map;
            this.map.each(function(val, x, y){
                if(val === void 0){
                    map.set(x, y, []);
                }
            });
        }
637554
function(size) {
      var t = this,
          css = _.clone(t.get('css')),
          parsedCss = $.parseStyleString(css['.nm-cv-viewport'] || '');
      if (!parsedCss.height && !parsedCss.width) {
        parsedCss.height = size.height + 'px';
        parsedCss.width = size.width + 'px';
        css['.nm-cv-viewport'] = $.makeStyleString(parsedCss);
        t.set({css: css});
      }
    }
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();
	}
21201
public void setCropArea(int x, int y, int width, int height) {

        m_cropX = x;
        m_cropY = y;
        m_cropWidth = width;
        m_cropHeight = height;
    }
81404
function( width, height ) {
		if( width !== this.width || height !== this.height ) {
			this.width = width;
			this.height = height;
			this._contentElement.outerWidth( width )
			     .outerHeight( height );
			this.emit( 'resize' );
		}
	}