Lines Matching refs: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 float right;
46 * checking is performed, so the caller must ensure that left <= right and
51 * @param right The X coordinate of the right side of the rectangle
54 public RectF(float left, float top, float right, float bottom) {
57 this.right = right;
70 left = top = right = bottom = 0.0f;
74 right = r.right;
81 left = top = right = bottom = 0.0f;
85 right = r.right;
96 return left == r.left && top == r.top && right == r.right && bottom == r.bottom;
103 result = 31 * result + (right != +0.0f ? Float.floatToIntBits(right) : 0);
110 + right + ", " + bottom + ")";
127 sb.append(top); sb.append("]["); sb.append(right);
138 pw.print(top); pw.print("]["); pw.print(right);
143 * Returns true if the rectangle is empty (left >= right or top >= bottom)
146 return left >= right || top >= bottom;
151 * (i.e. left <= right) so the result may be negative.
154 return right - left;
167 * a valid rectangle (i.e. left <= right)
170 return (left + right) * 0.5f;
185 left = right = top = bottom = 0;
191 * left <= right and top <= bottom.
195 * @param right The X coordinate of the right side of the rectangle
198 public void set(float left, float top, float right, float bottom) {
201 this.right = right;
214 this.right = src.right;
227 this.right = src.right;
232 * Offset the rectangle by adding dx to its left and right coordinates, and
235 * @param dx The amount to add to the rectangle's left and right coordinates
241 right += dx;
253 right += newLeft - left;
265 * @param dx The amount to add(subtract) from the rectangle's left(right)
271 right -= dx;
277 * considered to be inside, while the right and bottom are not. This means
278 * that for a x,y to be contained: left <= x < right and top <= y < bottom.
284 * means left <= x < right and top <= y < bottom
287 return left < right && top < bottom // check for empty first
288 && x >= left && x < right && y >= top && y < bottom;
298 * @param right The right side of the rectangle being tested for containment
303 public boolean contains(float left, float top, float right, float bottom) {
305 return this.left < this.right && this.top < this.bottom
308 && this.right >= right && this.bottom >= bottom;
321 return this.left < this.right && this.top < this.bottom
324 && right >= r.right && bottom >= r.bottom;
328 * If the rectangle specified by left,top,right,bottom intersects this
337 * @param right The right side of the rectangle being intersected with this
345 public boolean intersect(float left, float top, float right, float bottom) {
346 if (this.left < right && left < this.right
354 if (this.right > right) {
355 this.right = right;
377 return intersect(r.left, r.top, r.right, r.bottom);
393 if (a.left < b.right && b.left < a.right
397 right = Math.min(a.right, b.right);
412 * @param right The right side of the rectangle being tested for
418 public boolean intersects(float left, float top, float right,
420 return this.left < right && left < this.right
435 return a.left < b.right && b.left < a.right
445 FastMath.round(right), FastMath.round(bottom));
450 * floor of top and left, and the ceiling of right and bottom.
454 (int) FloatMath.ceil(right), (int) FloatMath.ceil(bottom));
464 * @param right The right edge being unioned with this rectangle
467 public void union(float left, float top, float right, float bottom) {
468 if ((left < right) && (top < bottom)) {
469 if ((this.left < this.right) && (this.top < this.bottom)) {
474 if (this.right < right)
475 this.right = right;
481 this.right = right;
495 union(r.left, r.top, r.right, r.bottom);
508 } else if (x > right) {
509 right = x;
519 * Swap top/bottom or left/right if there are flipped (i.e. left > right
522 * If the edges are already correct (i.e. left <= right and top <= bottom)
526 if (left > right) {
528 left = right;
529 right = temp;
553 out.writeFloat(right);
584 right = in.readFloat();