Lines Matching refs:left

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).
34 public int left;
61 * checking is performed, so the caller must ensure that left <= right and
64 * @param left The X coordinate of the left side of the rectangle
69 public Rect(int left, int top, int right, int bottom) {
70 this.left = left;
78 * rectangle (which is left unmodified).
85 left = top = right = bottom = 0;
87 left = r.left;
100 return left == r.left && top == r.top && right == r.right && bottom == r.bottom;
105 int result = left;
115 sb.append("Rect("); sb.append(left); sb.append(", ");
134 sb.append('['); sb.append(left); sb.append(',');
146 * @return Returns a new String of the form "left top right bottom"
152 sb.append(left);
182 pw.print('['); pw.print(left); pw.print(',');
188 * Returns true if the rectangle is empty (left >= right or top >= bottom)
191 return left >= right || top >= bottom;
196 * (i.e. left <= right) so the result may be negative.
199 return right - left;
216 return (left + right) >> 1;
232 return (left + right) * 0.5f;
246 left = right = top = bottom = 0;
252 * left <= right and top <= bottom.
254 * @param left The X coordinate of the left side of the rectangle
259 public void set(int left, int top, int right, int bottom) {
260 this.left = left;
273 this.left = src.left;
280 * Offset the rectangle by adding dx to its left and right coordinates, and
283 * @param dx The amount to add to the rectangle's left and right coordinates
287 left += dx;
294 * Offset the rectangle to a specific (left, top) position,
297 * @param newLeft The new "left" coordinate for the rectangle
301 right += newLeft - left;
303 left = newLeft;
313 * @param dx The amount to add(subtract) from the rectangle's left(right)
317 left += dx;
324 * Returns true if (x,y) is inside the rectangle. The left and top are
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;
344 * @param left The left side 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
355 && this.left <= left && this.top <= top
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
381 * @param left The left side 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) {
394 if (this.left < left) this.left = left;
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) {
432 left = Math.max(a.left, b.left);
447 * @param left The left side 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;
478 * @param left The left 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)) {
486 if (this.left > left) this.left = left;
491 this.left = left;
507 union(r.left, r.top, r.right, r.bottom);
518 if (x < left) {
519 left = x;
531 * Swap top/bottom or left/right if there are flipped (i.e. left > right
534 * If the edges are already correct (i.e. left <= right and top <= bottom)
538 if (left > right) {
539 int temp = left;
540 left = right;
563 out.writeInt(left);
594 left = in.readInt();
606 left = (int) (left * scale + 0.5f);
619 left = (int) Math.ceil(left * scale);