Lines Matching defs:right

28  * represented by the coordinates of its 4 edges (left, top, right bottom).
31 * the coordinates are sorted correctly (i.e. left <= right and top <= bottom).
36 public int right;
49 * checking is performed, so the caller must ensure that left <= right and
54 * @param right The X coordinate of the right side of the rectagle
57 public Rect(int left, int top, int right, int bottom) {
60 this.right = right;
74 right = r.right;
82 return left == r.left && top == r.top && right == r.right
92 sb.append(top); sb.append(" - "); sb.append(right);
111 sb.append(top); sb.append("]["); sb.append(right);
122 * @return Returns a new String of the form "left top right bottom"
132 sb.append(right);
159 pw.print(top); pw.print("]["); pw.print(right);
164 * Returns true if the rectangle is empty (left >= right or top >= bottom)
167 return left >= right || top >= bottom;
172 * (i.e. left <= right) so the result may be negative.
175 return right - left;
192 return (left + right) >> 1;
208 return (left + right) * 0.5f;
222 left = right = top = bottom = 0;
228 * left <= right and top <= bottom.
232 * @param right The X coordinate of the right side of the rectagle
235 public void set(int left, int top, int right, int bottom) {
238 this.right = right;
251 this.right = src.right;
256 * Offset the rectangle by adding dx to its left and right coordinates, and
259 * @param dx The amount to add to the rectangle's left and right coordinates
265 right += dx;
277 right += newLeft - left;
289 * @param dx The amount to add(subtract) from the rectangle's left(right)
295 right -= dx;
301 * considered to be inside, while the right and bottom are not. This means
302 * that for a x,y to be contained: left <= x < right and top <= y < bottom.
308 * means left <= x < right and top <= y < bottom
311 return left < right && top < bottom // check for empty first
312 && x >= left && x < right && y >= top && y < bottom;
322 * @param right The right side of the rectangle being tested for containment
327 public boolean contains(int left, int top, int right, int bottom) {
329 return this.left < this.right && this.top < this.bottom
332 && this.right >= right && this.bottom >= bottom;
345 return this.left < this.right && this.top < this.bottom
348 && right >= r.right && bottom >= r.bottom;
352 * If the rectangle specified by left,top,right,bottom intersects this
361 * @param right The right side of the rectangle being intersected with this
369 public boolean intersect(int left, int top, int right, int bottom) {
370 if (this.left < right && left < this.right
378 if (this.right > right) {
379 this.right = right;
401 return intersect(r.left, r.top, r.right, r.bottom);
417 if (a.left < b.right && b.left < a.right
421 right = Math.min(a.right, b.right);
436 * @param right The right side of the rectangle being tested for
442 public boolean intersects(int left, int top, int right, int bottom) {
443 return this.left < right && left < this.right
458 return a.left < b.right && b.left < a.right
469 * @param right The right edge being unioned with this rectangle
472 public void union(int left, int top, int right, int bottom) {
473 if ((left < right) && (top < bottom)) {
474 if ((this.left < this.right) && (this.top < this.bottom)) {
479 if (this.right < right)
480 this.right = right;
486 this.right = right;
500 union(r.left, r.top, r.right, r.bottom);
513 } else if (x > right) {
514 right = x;
524 * Swap top/bottom or left/right if there are flipped (i.e. left > right
527 * If the edges are already correct (i.e. left <= right and top <= bottom)
531 if (left > right) {
533 left = right;
534 right = temp;
558 out.writeInt(right);
589 right = in.readInt();
601 right = (int) (right * scale + 0.5f);