Lines Matching refs:left

29  * represented by the coordinates of its 4 edges (left, top, right bottom).
32 * the coordinates are sorted correctly (i.e. left <= right and top <= bottom).
36 * into the column and row described by its left and top coordinates, but not
40 public int left;
67 * checking is performed, so the caller must ensure that left <= right and
70 * @param left The X coordinate of the left side of the rectangle
75 public Rect(int left, int top, int right, int bottom) {
76 this.left = left;
84 * rectangle (which is left unmodified).
91 left = top = right = bottom = 0;
93 left = r.left;
106 return left == r.left && top == r.top && right == r.right && bottom == r.bottom;
111 int result = left;
121 sb.append("Rect("); sb.append(left); sb.append(", ");
140 sb.append('['); sb.append(left); sb.append(',');
152 * @return Returns a new String of the form "left top right bottom"
158 sb.append(left);
188 pw.print('['); pw.print(left); pw.print(',');
194 * Returns true if the rectangle is empty (left >= right or top >= bottom)
197 return left >= right || top >= bottom;
202 * (i.e. left <= right) so the result may be negative.
205 return right - left;
222 return (left + right) >> 1;
238 return (left + right) * 0.5f;
252 left = right = top = bottom = 0;
258 * left <= right and top <= bottom.
260 * @param left The X coordinate of the left side of the rectangle
265 public void set(int left, int top, int right, int bottom) {
266 this.left = left;
279 this.left = src.left;
286 * Offset the rectangle by adding dx to its left and right coordinates, and
289 * @param dx The amount to add to the rectangle's left and right coordinates
293 left += dx;
300 * Offset the rectangle to a specific (left, top) position,
303 * @param newLeft The new "left" coordinate for the rectangle
307 right += newLeft - left;
309 left = newLeft;
319 * @param dx The amount to add(subtract) from the rectangle's left(right)
323 left += dx;
336 left += insets.left;
345 * @param left The amount to add from the rectangle's left
350 public void inset(int left, int top, int right, int bottom) {
351 this.left += left;
358 * Returns true if (x,y) is inside the rectangle. The left and top are
360 * that for a x,y to be contained: left <= x < right and top <= y < bottom.
366 * means left <= x < right and top <= y < bottom
369 return left < right && top < bottom // check for empty first
370 && x >= left && x < right && y >= top && y < bottom;
378 * @param left The left side of the rectangle being tested for containment
385 public boolean contains(int left, int top, int right, int bottom) {
387 return this.left < this.right && this.top < this.bottom
389 && this.left <= left && this.top <= top
403 return this.left < this.right && this.top < this.bottom
405 && left <= r.left && top <= r.top && right >= r.right && bottom >= r.bottom;
409 * If the rectangle specified by left,top,right,bottom intersects this
415 * @param left The left side of the rectangle being intersected with this
427 public boolean intersect(int left, int top, int right, int bottom) {
428 if (this.left < right && left < this.right && this.top < bottom && top < this.bottom) {
429 if (this.left < left) this.left = left;
451 return intersect(r.left, r.top, r.right, r.bottom);
468 if (a.left < b.right && b.left < a.right && a.top < b.bottom && b.top < a.bottom) {
469 left = Math.max(a.left, b.left);
484 * @param left The left side of the rectangle being tested for intersection
492 public boolean intersects(int left, int top, int right, int bottom) {
493 return this.left < right && left < this.right && this.top < bottom && top < this.bottom;
507 return a.left < b.right && b.left < a.right && a.top < b.bottom && b.top < a.bottom;
515 * @param left The left edge being unioned with this rectangle
520 public void union(int left, int top, int right, int bottom) {
521 if ((left < right) && (top < bottom)) {
522 if ((this.left < this.right) && (this.top < this.bottom)) {
523 if (this.left > left) this.left = left;
528 this.left = left;
544 union(r.left, r.top, r.right, r.bottom);
555 if (x < left) {
556 left = x;
568 * Swap top/bottom or left/right if there are flipped (i.e. left > right
571 * If the edges are already correct (i.e. left <= right and top <= bottom)
575 if (left > right) {
576 int temp = left;
577 left = right;
600 out.writeInt(left);
631 left = in.readInt();
643 left = (int) (left * scale + 0.5f);