Home | History | Annotate | Download | only in graphics

Lines Matching refs:left

32  * represented by the coordinates of its 4 edges (left, top, right bottom).
35 * the coordinates are sorted correctly (i.e. left <= right and top <= bottom).
39 * into the column and row described by its left and top coordinates, but not
43 public int left;
70 * checking is performed, so the caller must ensure that left <= right and
73 * @param left The X coordinate of the left side of the rectangle
78 public Rect(int left, int top, int right, int bottom) {
79 this.left = left;
87 * rectangle (which is left unmodified).
94 left = top = right = bottom = 0;
96 left = r.left;
119 return left == r.left && top == r.top && right == r.right && bottom == r.bottom;
124 int result = left;
134 sb.append("Rect("); sb.append(left); sb.append(", ");
153 sb.append('['); sb.append(left); sb.append(',');
165 * @return Returns a new String of the form "left top right bottom"
171 sb.append(left);
205 pw.print('['); pw.print(left); pw.print(',');
220 protoOutputStream.write(RectProto.LEFT, left);
228 * Returns true if the rectangle is empty (left >= right or top >= bottom)
231 return left >= right || top >= bottom;
236 * (i.e. left <= right) so the result may be negative.
239 return right - left;
256 return (left + right) >> 1;
272 return (left + right) * 0.5f;
286 left = right = top = bottom = 0;
292 * left <= right and top <= bottom.
294 * @param left The X coordinate of the left side of the rectangle
299 public void set(int left, int top, int right, int bottom) {
300 this.left = left;
313 this.left = src.left;
320 * Offset the rectangle by adding dx to its left and right coordinates, and
323 * @param dx The amount to add to the rectangle's left and right coordinates
327 left += dx;
334 * Offset the rectangle to a specific (left, top) position,
337 * @param newLeft The new "left" coordinate for the rectangle
341 right += newLeft - left;
343 left = newLeft;
353 * @param dx The amount to add(subtract) from the rectangle's left(right)
357 left += dx;
370 left += insets.left;
379 * @param left The amount to add from the rectangle's left
384 public void inset(int left, int top, int right, int bottom) {
385 this.left += left;
392 * Returns true if (x,y) is inside the rectangle. The left and top are
394 * that for a x,y to be contained: left <= x < right and top <= y < bottom.
400 * means left <= x < right and top <= y < bottom
403 return left < right && top < bottom // check for empty first
404 && x >= left && x < right && y >= top && y < bottom;
412 * @param left The left side of the rectangle being tested for containment
419 public boolean contains(int left, int top, int right, int bottom) {
421 return this.left < this.right && this.top < this.bottom
423 && this.left <= left && this.top <= top
437 return this.left < this.right && this.top < this.bottom
439 && left <= r.left && top <= r.top && right >= r.right && bottom >= r.bottom;
443 * If the rectangle specified by left,top,right,bottom intersects this
449 * @param left The left side of the rectangle being intersected with this
461 public boolean intersect(int left, int top, int right, int bottom) {
462 if (this.left < right && left < this.right && this.top < bottom && top < this.bottom) {
463 left < left) this.left = left;
485 return intersect(r.left, r.top, r.right, r.bottom);
495 left = Math.max(left, other.left);
515 if (a.left < b.right && b.left < a.right && a.top < b.bottom && b.top < a.bottom) {
516 left = Math.max(a.left, b.left);
531 * @param left The left side of the rectangle being tested for intersection
539 public boolean intersects(int left, int top, int right, int bottom) {
540 return this.left < right && left < this.right && this.top < bottom && top < this.bottom;
554 return a.left < b.right && b.left < a.right && a.top < b.bottom && b.top < a.bottom;
562 * @param left The left edge being unioned with this rectangle
567 public void union(int left, int top, int right, int bottom) {
568 if ((left < right) && (top < bottom)) {
569 if ((this.left < this.right) && (this.top < this.bottom)) {
570 if (this.left > left) this.left = left;
575 this.left = left;
591 union(r.left, r.top, r.right, r.bottom);
602 if (x < left) {
603 left = x;
615 * Swap top/bottom or left/right if there are flipped (i.e. left > right
618 * If the edges are already correct (i.e. left <= right and top <= bottom)
622 if (left > right) {
623 int temp = left;
624 left = right;
647 out.writeInt(left);
678 left = in.readInt();
690 left = (int) (left * scale + 0.5f);