49 |
* in methods like <code>contains</code> or <code>intersects</code> is |
* in methods like <code>contains</code> or <code>intersects</code> is |
50 |
* undefined unless the rectangle has positive width and height. |
* undefined unless the rectangle has positive width and height. |
51 |
* |
* |
52 |
* @author Tom Tromey <tromey@cygnus.com> |
* @author Tom Tromey (tromey@cygnus.com) |
53 |
* @author Eric Blake <ebb9@email.byu.edu> |
* @author Eric Blake (ebb9@email.byu.edu) |
54 |
* @since 1.2 |
* @since 1.2 |
55 |
* @status updated to 1.4 |
* @status updated to 1.4 |
56 |
*/ |
*/ |
71 |
public static final int OUT_TOP = 2; |
public static final int OUT_TOP = 2; |
72 |
|
|
73 |
/** |
/** |
74 |
* The point lies right of the rectangle (p.x > r.maxX). |
* The point lies right of the rectangle (p.x > r.maxX). |
75 |
* |
* |
76 |
* @see #outcode() |
* @see #outcode() |
77 |
*/ |
*/ |
78 |
public static final int OUT_RIGHT = 4; |
public static final int OUT_RIGHT = 4; |
79 |
|
|
80 |
/** |
/** |
81 |
* The point lies below of the rectangle (p.y > r.maxY). |
* The point lies below of the rectangle (p.y > r.maxY). |
82 |
* |
* |
83 |
* @see #outcode() |
* @see #outcode() |
84 |
*/ |
*/ |
335 |
* inside the rectangle, a subsequent call to <code>contains</code> may |
* inside the rectangle, a subsequent call to <code>contains</code> may |
336 |
* return false. |
* return false. |
337 |
* |
* |
338 |
* @param x the X coordinate of the point to add to this rectangle |
* @param newx the X coordinate of the point to add to this rectangle |
339 |
* @param y the Y coordinate of the point to add to this rectangle |
* @param newy the Y coordinate of the point to add to this rectangle |
340 |
*/ |
*/ |
341 |
public void add(double newx, double newy) |
public void add(double newx, double newy) |
342 |
{ |
{ |
382 |
* safe; modifications to the rectangle do not affect the results of this |
* safe; modifications to the rectangle do not affect the results of this |
383 |
* path instance. |
* path instance. |
384 |
* |
* |
385 |
* @param transform an optional transform to apply to the iterator |
* @param at an optional transform to apply to the iterator |
386 |
* @return a new iterator over the boundary |
* @return a new iterator over the boundary |
387 |
* @since 1.2 |
* @since 1.2 |
388 |
*/ |
*/ |
490 |
* path instance. As the rectangle is already flat, the flatness parameter |
* path instance. As the rectangle is already flat, the flatness parameter |
491 |
* is ignored. |
* is ignored. |
492 |
* |
* |
493 |
* @param transform an optional transform to apply to the iterator |
* @param at an optional transform to apply to the iterator |
494 |
* @param double the maximum distance for deviation from the real boundary |
* @param flatness the maximum distance for deviation from the real boundary |
495 |
* @return a new iterator over the boundary |
* @return a new iterator over the boundary |
496 |
* @since 1.2 |
* @since 1.2 |
497 |
*/ |
*/ |
508 |
* + 37 * Double.doubleToLongBits(getY()) |
* + 37 * Double.doubleToLongBits(getY()) |
509 |
* + 43 * Double.doubleToLongBits(getWidth()) |
* + 43 * Double.doubleToLongBits(getWidth()) |
510 |
* + 47 * Double.doubleToLongBits(getHeight()); |
* + 47 * Double.doubleToLongBits(getHeight()); |
511 |
* return (int) ((l >> 32) ^ l); |
* return (int) ((l >> 32) ^ l); |
512 |
* </pre> |
* </pre> |
513 |
* |
* |
514 |
* @return the hashcode |
* @return the hashcode |
543 |
/** |
/** |
544 |
* This class defines a rectangle in <code>double</code> precision. |
* This class defines a rectangle in <code>double</code> precision. |
545 |
* |
* |
546 |
* @author Eric Blake <ebb9@email.byu.edu> |
* @author Eric Blake (ebb9@email.byu.edu) |
547 |
* @since 1.2 |
* @since 1.2 |
548 |
* @status updated to 1.4 |
* @status updated to 1.4 |
549 |
*/ |
*/ |
747 |
return getClass().getName() + "[x=" + x + ",y=" + y + ",w=" + width |
return getClass().getName() + "[x=" + x + ",y=" + y + ",w=" + width |
748 |
+ ",h=" + height + ']'; |
+ ",h=" + height + ']'; |
749 |
} |
} |
750 |
} // class Double |
} |
751 |
|
|
752 |
/** |
/** |
753 |
* This class defines a rectangle in <code>float</code> precision. |
* This class defines a rectangle in <code>float</code> precision. |
754 |
* |
* |
755 |
* @author Eric Blake <ebb9@email.byu.edu> |
* @author Eric Blake (ebb9@email.byu.edu) |
756 |
* @since 1.2 |
* @since 1.2 |
757 |
* @status updated to 1.4 |
* @status updated to 1.4 |
758 |
*/ |
*/ |
988 |
return getClass().getName() + "[x=" + x + ",y=" + y + ",w=" + width |
return getClass().getName() + "[x=" + x + ",y=" + y + ",w=" + width |
989 |
+ ",h=" + height + ']'; |
+ ",h=" + height + ']'; |
990 |
} |
} |
991 |
} // class Float |
} |
992 |
} // class Rectangle2D |
} |