Lines Matching refs:right

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).
34 * Note that the right and bottom coordinates are exclusive. This means a Rect
37 * those of its bottom and right.
42 public int right;
67 * checking is performed, so the caller must ensure that left <= right and
72 * @param right The X coordinate of the right side of the rectangle
75 public Rect(int left, int top, int right, int bottom) {
78 this.right = right;
91 left = top = right = bottom = 0;
95 right = r.right;
106 return left == r.left && top == r.top && right == r.right && bottom == r.bottom;
113 result = 31 * result + right;
122 sb.append(top); sb.append(" - "); sb.append(right);
141 sb.append(top); sb.append("]["); sb.append(right);
152 * @return Returns a new String of the form "left top right bottom"
162 sb.append(right);
189 pw.print(top); pw.print("]["); pw.print(right);
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.
262 * @param right The X coordinate of the right side of the rectangle
265 public void set(int left, int top, int right, int bottom) {
268 this.right = right;
281 this.right = src.right;
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
295 right += dx;
307 right += newLeft - left;
319 * @param dx The amount to add(subtract) from the rectangle's left(right)
325 right -= dx;
338 right -= insets.right;
347 * @param right The amount to subtract from the rectangle's right
350 public void inset(int left, int top, int right, int bottom) {
353 this.right -= right;
359 * considered to be inside, while the right and bottom are not. This means
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;
380 * @param right The right 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
390 && this.right >= right && this.bottom >= bottom;
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
418 * @param right The right 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) {
431 if (this.right > right) this.right = right;
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) {
471 right = Math.min(a.right, b.right);
486 * @param right The right side of the rectangle being tested for
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;
517 * @param right The right 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)) {
525 if (this.right < right) this.right = right;
530 this.right = right;
544 union(r.left, r.top, r.right, r.bottom);
557 } else if (x > right) {
558 right = 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) {
577 left = right;
578 right = temp;
602 out.writeInt(right);
633 right = in.readInt();
645 right = (int) (right * scale + 0.5f);