Lines Matching refs:bottom

30  * represented by the coordinates of its 4 edges (left, top, right bottom).
33 * the coordinates are sorted correctly (i.e. left <= right and top <= bottom).
35 * Note that the right and bottom coordinates are exclusive. This means a Rect
38 * those of its bottom and right.
44 public int bottom;
69 * top <= bottom.
74 * @param bottom The Y coordinate of the bottom of the rectangle
76 public Rect(int left, int top, int right, int bottom) {
80 this.bottom = bottom;
92 left = top = right = bottom = 0;
97 bottom = r.bottom;
107 return left == r.left && top == r.top && right == r.right && bottom == r.bottom;
115 result = 31 * result + bottom;
124 sb.append(", "); sb.append(bottom); sb.append(")");
143 sb.append(','); sb.append(bottom); sb.append(']');
153 * @return Returns a new String of the form "left top right bottom"
165 sb.append(bottom);
195 pw.print(','); pw.print(bottom); pw.print(']');
199 * Returns true if the rectangle is empty (left >= right or top >= bottom)
202 return left >= right || top >= bottom;
215 * (i.e. top <= bottom) so the result may be negative.
218 return bottom - top;
236 return (top + bottom) >> 1;
250 return (top + bottom) * 0.5f;
257 left = right = top = bottom = 0;
263 * left <= right and top <= bottom.
268 * @param bottom The Y coordinate of the bottom of the rectangle
270 public void set(int left, int top, int right, int bottom) {
274 this.bottom = bottom;
287 this.bottom = src.bottom;
292 * adding dy to its top and bottom coordinates.
295 * @param dy The amount to add to the rectangle's top and bottom coordinates
301 bottom += dy;
313 bottom += newTop - top;
322 * for dy and the top and bottom.
325 * @param dy The amount to add(subtract) from the rectangle's top(bottom)
331 bottom -= dy;
344 bottom -= insets.bottom;
353 * @param bottom The amount to subtract from the rectangle's bottom
355 public void inset(int left, int top, int right, int bottom) {
359 this.bottom -= bottom;
364 * considered to be inside, while the right and bottom are not. This means
365 * that for a x,y to be contained: left <= x < right and top <= y < bottom.
371 * means left <= x < right and top <= y < bottom
374 return left < right && top < bottom // check for empty first
375 && x >= left && x < right && y >= top && y < bottom;
386 * @param bottom The bottom of the rectangle being tested for containment
390 public boolean contains(int left, int top, int right, int bottom) {
392 return this.left < this.right && this.top < this.bottom
395 && this.right >= right && this.bottom >= bottom;
408 return this.left < this.right && this.top < this.bottom
410 && left <= r.left && top <= r.top && right >= r.right && bottom >= r.bottom;
414 * If the rectangle specified by left,top,right,bottom intersects this
425 * @param bottom The bottom of the rectangle being intersected with this
432 public boolean intersect(int left, int top, int right, int bottom) {
433 if (this.left < right && left < this.right && this.top < bottom && top < this.bottom) {
437 if (this.bottom > bottom) this.bottom = bottom;
456 return intersect(r.left, r.top, r.right, r.bottom);
473 if (a.left < b.right && b.left < a.right && a.top < b.bottom && b.top < a.bottom) {
477 bottom = Math.min(a.bottom, b.bottom);
493 * @param bottom The bottom of the rectangle being tested for intersection
497 public boolean intersects(int left, int top, int right, int bottom) {
498 return this.left < right && left < this.right && this.top < bottom && top < this.bottom;
512 return a.left < b.right && b.left < a.right && a.top < b.bottom && b.top < a.bottom;
523 * @param bottom The bottom edge being unioned with this rectangle
525 public void union(int left, int top, int right, int bottom) {
526 if ((left < right) && (top < bottom)) {
527 if ((this.left < this.right) && (this.top < this.bottom)) {
531 if (this.bottom < bottom) this.bottom = bottom;
536 this.bottom = bottom;
549 union(r.left, r.top, r.right, r.bottom);
567 } else if (y > bottom) {
568 bottom = y;
573 * Swap top/bottom or left/right if there are flipped (i.e. left > right
574 * and/or top > bottom). This can be called if
576 * If the edges are already correct (i.e. left <= right and top <= bottom)
585 if (top > bottom) {
587 top = bottom;
588 bottom = temp;
608 out.writeInt(bottom);
639 bottom = in.readInt();
651 bottom = (int) (bottom * scale + 0.5f);