Lines Matching refs:right

30  * represented by the coordinates of its 4 edges (left, top, right bottom).
33 * the coordinates are sorted correctly (i.e. left <= right and top <= bottom).
35 * Note that the right and bottom coordinates are exclusive. This means a Rect
38 * those of its bottom and right.
43 public int right;
68 * checking is performed, so the caller must ensure that left <= right and
73 * @param right The X coordinate of the right side of the rectangle
76 public Rect(int left, int top, int right, int bottom) {
79 this.right = right;
92 left = top = right = bottom = 0;
96 right = r.right;
107 return left == r.left && top == r.top && right == r.right && bottom == r.bottom;
114 result = 31 * result + right;
123 sb.append(top); sb.append(" - "); sb.append(right);
142 sb.append(top); sb.append("]["); sb.append(right);
153 * @return Returns a new String of the form "left top right bottom"
163 sb.append(right);
194 pw.print(top); pw.print("]["); pw.print(right);
199 * Returns true if the rectangle is empty (left >= right or top >= bottom)
202 return left >= right || top >= bottom;
207 * (i.e. left <= right) so the result may be negative.
210 return right - left;
227 return (left + right) >> 1;
243 return (left + right) * 0.5f;
257 left = right = top = bottom = 0;
263 * left <= right and top <= bottom.
267 * @param right The X coordinate of the right side of the rectangle
270 public void set(int left, int top, int right, int bottom) {
273 this.right = right;
286 this.right = src.right;
291 * Offset the rectangle by adding dx to its left and right coordinates, and
294 * @param dx The amount to add to the rectangle's left and right coordinates
300 right += dx;
312 right += newLeft - left;
324 * @param dx The amount to add(subtract) from the rectangle's left(right)
330 right -= dx;
343 right -= insets.right;
352 * @param right The amount to subtract from the rectangle's right
355 public void inset(int left, int top, int right, int bottom) {
358 this.right -= right;
364 * considered to be inside, while the right and bottom are not. This means
365 * that for a x,y to be contained: left <= x < right and top <= y < bottom.
371 * means left <= x < right and top <= y < bottom
374 return left < right && top < bottom // check for empty first
375 && x >= left && x < right && y >= top && y < bottom;
385 * @param right The right side of the rectangle being tested for containment
390 public boolean contains(int left, int top, int right, int bottom) {
392 return this.left < this.right && this.top < this.bottom
395 && this.right >= right && this.bottom >= bottom;
408 return this.left < this.right && this.top < this.bottom
410 && left <= r.left && top <= r.top && right >= r.right && bottom >= r.bottom;
414 * If the rectangle specified by left,top,right,bottom intersects this
423 * @param right The right side of the rectangle being intersected with this
432 public boolean intersect(int left, int top, int right, int bottom) {
433 if (this.left < right && left < this.right && this.top < bottom && top < this.bottom) {
436 if (this.right > right) this.right = right;
456 return intersect(r.left, r.top, r.right, r.bottom);
473 if (a.left < b.right && b.left < a.right && a.top < b.bottom && b.top < a.bottom) {
476 right = Math.min(a.right, b.right);
491 * @param right The right side of the rectangle being tested for
497 public boolean intersects(int left, int top, int right, int bottom) {
498 return this.left < right && left < this.right && this.top < bottom && top < this.bottom;
512 return a.left < b.right && b.left < a.right && a.top < b.bottom && b.top < a.bottom;
522 * @param right The right edge being unioned with this rectangle
525 public void union(int left, int top, int right, int bottom) {
526 if ((left < right) && (top < bottom)) {
527 if ((this.left < this.right) && (this.top < this.bottom)) {
530 if (this.right < right) this.right = right;
535 this.right = right;
549 union(r.left, r.top, r.right, r.bottom);
562 } else if (x > right) {
563 right = x;
573 * Swap top/bottom or left/right if there are flipped (i.e. left > right
576 * If the edges are already correct (i.e. left <= right and top <= bottom)
580 if (left > right) {
582 left = right;
583 right = temp;
607 out.writeInt(right);
638 right = in.readInt();
650 right = (int) (right * scale + 0.5f);