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;
49 * checking is performed, so the caller must ensure that left <= right and
52 * @param left The X coordinate of the left side of the rectangle
57 public Rect(int left, int top, int right, int bottom) {
58 this.left = left;
66 * rectangle (which is left unmodified).
73 left = top = right = bottom = 0;
75 left = r.left;
88 return left == r.left && top == r.top && right == r.right && bottom == r.bottom;
93 int result = left;
103 sb.append("Rect("); sb.append(left); sb.append(", ");
122 sb.append('['); sb.append(left); sb.append(',');
134 * @return Returns a new String of the form "left top right bottom"
140 sb.append(left);
170 pw.print('['); pw.print(left); pw.print(',');
176 * Returns true if the rectangle is empty (left >= right or top >= bottom)
179 return left >= right || top >= bottom;
184 * (i.e. left <= right) so the result may be negative.
187 return right - left;
204 return (left + right) >> 1;
220 return (left + right) * 0.5f;
234 left = right = top = bottom = 0;
240 * left <= right and top <= bottom.
242 * @param left The X coordinate of the left side of the rectangle
247 public void set(int left, int top, int right, int bottom) {
248 this.left = left;
261 this.left = src.left;
268 * Offset the rectangle by adding dx to its left and right coordinates, and
271 * @param dx The amount to add to the rectangle's left and right coordinates
275 left += dx;
282 * Offset the rectangle to a specific (left, top) position,
285 * @param newLeft The new "left" coordinate for the rectangle
289 right += newLeft - left;
291 left = newLeft;
301 * @param dx The amount to add(subtract) from the rectangle's left(right)
305 left += dx;
312 * Returns true if (x,y) is inside the rectangle. The left and top are
314 * that for a x,y to be contained: left <= x < right and top <= y < bottom.
320 * means left <= x < right and top <= y < bottom
323 return left < right && top < bottom // check for empty first
324 && x >= left && x < right && y >= top && y < bottom;
332 * @param left The left side of the rectangle being tested for containment
339 public boolean contains(int left, int top, int right, int bottom) {
341 return this.left < this.right && this.top < this.bottom
343 && this.left <= left && this.top <= top
357 return this.left < this.right && this.top < this.bottom
359 && left <= r.left && top <= r.top && right >= r.right && bottom >= r.bottom;
363 * If the rectangle specified by left,top,right,bottom intersects this
369 * @param left The left side of the rectangle being intersected with this
380 public boolean intersect(int left, int top, int right, int bottom) {
381 if (this.left < right && left < this.right && this.top < bottom && top < this.bottom) {
382 if (this.left < left) this.left = left;
403 return intersect(r.left, r.top, r.right, r.bottom);
419 if (a.left < b.right && b.left < a.right && a.top < b.bottom && b.top < a.bottom) {
420 left = Math.max(a.left, b.left);
435 * @param left The left side of the rectangle being tested for intersection
443 public boolean intersects(int left, int top, int right, int bottom) {
444 return this.left < right && left < this.right && this.top < bottom && top < this.bottom;
458 return a.left < b.right && b.left < a.right && a.top < b.bottom && b.top < a.bottom;
466 * @param left The left edge being unioned with this rectangle
471 public void union(int left, int top, int right, int bottom) {
472 if ((left < right) && (top < bottom)) {
473 if ((this.left < this.right) && (this.top < this.bottom)) {
474 if (this.left > left) this.left = left;
479 this.left = left;
495 union(r.left, r.top, r.right, r.bottom);
506 if (x < left) {
507 left = 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) {
527 int temp = left;
528 left = right;
551 out.writeInt(left);
582 left = in.readInt();
594 left = (int) (left * scale + 0.5f);