Lines Matching refs:bottom

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).
37 public int bottom;
62 * top <= bottom.
67 * @param bottom The Y coordinate of the bottom of the rectangle
69 public Rect(int left, int top, int right, int bottom) {
73 this.bottom = bottom;
85 left = top = right = bottom = 0;
90 bottom = r.bottom;
100 return left == r.left && top == r.top && right == r.right && bottom == r.bottom;
108 result = 31 * result + bottom;
117 sb.append(", "); sb.append(bottom); sb.append(")");
136 sb.append(','); sb.append(bottom); sb.append(']');
146 * @return Returns a new String of the form "left top right bottom"
158 sb.append(bottom);
184 pw.print(','); pw.print(bottom); pw.print(']');
188 * Returns true if the rectangle is empty (left >= right or top >= bottom)
191 return left >= right || top >= bottom;
204 * (i.e. top <= bottom) so the result may be negative.
207 return bottom - top;
225 return (top + bottom) >> 1;
239 return (top + bottom) * 0.5f;
246 left = right = top = bottom = 0;
252 * left <= right and top <= bottom.
257 * @param bottom The Y coordinate of the bottom of the rectangle
259 public void set(int left, int top, int right, int bottom) {
263 this.bottom = bottom;
276 this.bottom = src.bottom;
281 * adding dy to its top and bottom coordinates.
284 * @param dy The amount to add to the rectangle's top and bottom coordinates
290 bottom += dy;
302 bottom += newTop - top;
311 * for dy and the top and bottom.
314 * @param dy The amount to add(subtract) from the rectangle's top(bottom)
320 bottom -= dy;
325 * considered to be inside, while the right and bottom are not. This means
326 * that for a x,y to be contained: left <= x < right and top <= y < bottom.
332 * means left <= x < right and top <= y < bottom
335 return left < right && top < bottom // check for empty first
336 && x >= left && x < right && y >= top && y < bottom;
347 * @param bottom The bottom of the rectangle being tested for containment
351 public boolean contains(int left, int top, int right, int bottom) {
353 return this.left < this.right && this.top < this.bottom
356 && this.right >= right && this.bottom >= bottom;
369 return this.left < this.right && this.top < this.bottom
371 && left <= r.left && top <= r.top && right >= r.right && bottom >= r.bottom;
375 * If the rectangle specified by left,top,right,bottom intersects this
386 * @param bottom The bottom of the rectangle being intersected with this
392 public boolean intersect(int left, int top, int right, int bottom) {
393 if (this.left < right && left < this.right && this.top < bottom && top < this.bottom) {
397 if (this.bottom > bottom) this.bottom = bottom;
415 return intersect(r.left, r.top, r.right, r.bottom);
431 if (a.left < b.right && b.left < a.right && a.top < b.bottom && b.top < a.bottom) {
435 bottom = Math.min(a.bottom, b.bottom);
451 * @param bottom The bottom of the rectangle being tested for intersection
455 public boolean intersects(int left, int top, int right, int bottom) {
456 return this.left < right && left < this.right && this.top < bottom && top < this.bottom;
470 return a.left < b.right && b.left < a.right && a.top < b.bottom && b.top < a.bottom;
481 * @param bottom The bottom edge being unioned with this rectangle
483 public void union(int left, int top, int right, int bottom) {
484 if ((left < right) && (top < bottom)) {
485 if ((this.left < this.right) && (this.top < this.bottom)) {
489 if (this.bottom < bottom) this.bottom = bottom;
494 this.bottom = bottom;
507 union(r.left, r.top, r.right, r.bottom);
525 } else if (y > bottom) {
526 bottom = y;
531 * Swap top/bottom or left/right if there are flipped (i.e. left > right
532 * and/or top > bottom). This can be called if
534 * If the edges are already correct (i.e. left <= right and top <= bottom)
543 if (top > bottom) {
545 top = bottom;
546 bottom = temp;
566 out.writeInt(bottom);
597 bottom = in.readInt();
609 bottom = (int) (bottom * scale + 0.5f);
622 bottom = (int) Math.floor(bottom * scale);