Lines Matching refs:right

27  * represented by the coordinates of its 4 edges (left, top, right bottom).
30 * the coordinates are sorted correctly (i.e. left <= right and top <= bottom).
35 public float right;
45 * checking is performed, so the caller must ensure that left <= right and
50 * @param right The X coordinate of the right side of the rectangle
53 public RectF(float left, float top, float right, float bottom) {
56 this.right = right;
69 left = top = right = bottom = 0.0f;
73 right = r.right;
80 left = top = right = bottom = 0.0f;
84 right = r.right;
95 return left == r.left && top == r.top && right == r.right && bottom == r.bottom;
102 result = 31 * result + (right != +0.0f ? Float.floatToIntBits(right) : 0);
109 + right + ", " + bottom + ")";
126 sb.append(top); sb.append("]["); sb.append(right);
137 pw.print(top); pw.print("]["); pw.print(right);
142 * Returns true if the rectangle is empty (left >= right or top >= bottom)
145 return left >= right || top >= bottom;
150 * (i.e. left <= right) so the result may be negative.
153 return right - left;
166 * a valid rectangle (i.e. left <= right)
169 return (left + right) * 0.5f;
184 left = right = top = bottom = 0;
190 * left <= right and top <= bottom.
194 * @param right The X coordinate of the right side of the rectangle
197 public void set(float left, float top, float right, float bottom) {
200 this.right = right;
213 this.right = src.right;
226 this.right = src.right;
231 * Offset the rectangle by adding dx to its left and right coordinates, and
234 * @param dx The amount to add to the rectangle's left and right coordinates
240 right += dx;
252 right += newLeft - left;
264 * @param dx The amount to add(subtract) from the rectangle's left(right)
270 right -= dx;
276 * considered to be inside, while the right and bottom are not. This means
277 * that for a x,y to be contained: left <= x < right and top <= y < bottom.
283 * means left <= x < right and top <= y < bottom
286 return left < right && top < bottom // check for empty first
287 && x >= left && x < right && y >= top && y < bottom;
297 * @param right The right side of the rectangle being tested for containment
302 public boolean contains(float left, float top, float right, float bottom) {
304 return this.left < this.right && this.top < this.bottom
307 && this.right >= right && this.bottom >= bottom;
320 return this.left < this.right && this.top < this.bottom
323 && right >= r.right && bottom >= r.bottom;
327 * If the rectangle specified by left,top,right,bottom intersects this
336 * @param right The right side of the rectangle being intersected with this
344 public boolean intersect(float left, float top, float right, float bottom) {
345 if (this.left < right && left < this.right
353 if (this.right > right) {
354 this.right = right;
376 return intersect(r.left, r.top, r.right, r.bottom);
392 if (a.left < b.right && b.left < a.right
396 right = Math.min(a.right, b.right);
411 * @param right The right side of the rectangle being tested for
417 public boolean intersects(float left, float top, float right,
419 return this.left < right && left < this.right
434 return a.left < b.right && b.left < a.right
444 FastMath.round(right), FastMath.round(bottom));
449 * floor of top and left, and the ceiling of right and bottom.
453 (int) Math.ceil(right), (int) Math.ceil(bottom));
463 * @param right The right edge being unioned with this rectangle
466 public void union(float left, float top, float right, float bottom) {
467 if ((left < right) && (top < bottom)) {
468 if ((this.left < this.right) && (this.top < this.bottom)) {
473 if (this.right < right)
474 this.right = right;
480 this.right = right;
494 union(r.left, r.top, r.right, r.bottom);
507 } else if (x > right) {
508 right = x;
518 * Swap top/bottom or left/right if there are flipped (i.e. left > right
521 * If the edges are already correct (i.e. left <= right and top <= bottom)
525 if (left > right) {
527 left = right;
528 right = temp;
552 out.writeFloat(right);
583 right = in.readFloat();