< prev index next >

src/java.desktop/share/classes/sun/java2d/pipe/Region.java

Print this page

        

*** 102,116 **** static { initIDs(); } /** ! * Adds the dimension <code>dim</code> to the coordinate ! * <code>start</code> with appropriate clipping. If ! * <code>dim</code> is non-positive then the method returns * the start coordinate. If the sum overflows an integer ! * data type then the method returns <code>Integer.MAX_VALUE</code>. */ public static int dimAdd(int start, int dim) { if (dim <= 0) return start; if ((dim += start) < start) return Integer.MAX_VALUE; return dim; --- 102,116 ---- static { initIDs(); } /** ! * Adds the dimension {@code dim} to the coordinate ! * {@code start} with appropriate clipping. If ! * {@code dim} is non-positive then the method returns * the start coordinate. If the sum overflows an integer ! * data type then the method returns {@code Integer.MAX_VALUE}. */ public static int dimAdd(int start, int dim) { if (dim <= 0) return start; if ((dim += start) < start) return Integer.MAX_VALUE; return dim;
*** 177,189 **** * on the specified Shape object under the optionally specified * AffineTransform object. * * @param s a non-null Shape object specifying the geometry enclosing * the pixels of interest ! * @param at an optional <code>AffineTransform</code> to be applied to the * coordinates as they are returned in the iteration, or ! * <code>null</code> if untransformed coordinates are desired */ public static Region getInstance(Shape s, AffineTransform at) { return getInstance(WHOLE_REGION, false, s, at); } --- 177,189 ---- * on the specified Shape object under the optionally specified * AffineTransform object. * * @param s a non-null Shape object specifying the geometry enclosing * the pixels of interest ! * @param at an optional {@code AffineTransform} to be applied to the * coordinates as they are returned in the iteration, or ! * {@code null} if untransformed coordinates are desired */ public static Region getInstance(Shape s, AffineTransform at) { return getInstance(WHOLE_REGION, false, s, at); }
*** 203,215 **** * * @param devBounds a non-null Region specifying some bounds to * clip the geometry to * @param s a non-null Shape object specifying the geometry enclosing * the pixels of interest ! * @param at an optional <code>AffineTransform</code> to be applied to the * coordinates as they are returned in the iteration, or ! * <code>null</code> if untransformed coordinates are desired */ public static Region getInstance(Region devBounds, Shape s, AffineTransform at) { return getInstance(devBounds, false, s, at); --- 203,215 ---- * * @param devBounds a non-null Region specifying some bounds to * clip the geometry to * @param s a non-null Shape object specifying the geometry enclosing * the pixels of interest ! * @param at an optional {@code AffineTransform} to be applied to the * coordinates as they are returned in the iteration, or ! * {@code null} if untransformed coordinates are desired */ public static Region getInstance(Region devBounds, Shape s, AffineTransform at) { return getInstance(devBounds, false, s, at);
*** 236,248 **** * clip the geometry to * @param normalize a boolean indicating whether or not to apply * normalization * @param s a non-null Shape object specifying the geometry enclosing * the pixels of interest ! * @param at an optional <code>AffineTransform</code> to be applied to the * coordinates as they are returned in the iteration, or ! * <code>null</code> if untransformed coordinates are desired */ public static Region getInstance(Region devBounds, boolean normalize, Shape s, AffineTransform at) { // Optimize for empty shapes to avoid involving the SpanIterator --- 236,248 ---- * clip the geometry to * @param normalize a boolean indicating whether or not to apply * normalization * @param s a non-null Shape object specifying the geometry enclosing * the pixels of interest ! * @param at an optional {@code AffineTransform} to be applied to the * coordinates as they are returned in the iteration, or ! * {@code null} if untransformed coordinates are desired */ public static Region getInstance(Region devBounds, boolean normalize, Shape s, AffineTransform at) { // Optimize for empty shapes to avoid involving the SpanIterator
*** 361,371 **** /** * Sets the rectangle of interest for storing and returning * region bands. The rectangle is specified in x, y, width, height * format and appropriate clipping is performed as per the method ! * <code>dimAdd</code>. * <p> * This method can also be used to initialize a simple rectangular * region. */ public void setOutputAreaXYWH(int x, int y, int w, int h) { --- 361,371 ---- /** * Sets the rectangle of interest for storing and returning * region bands. The rectangle is specified in x, y, width, height * format and appropriate clipping is performed as per the method ! * {@code dimAdd}. * <p> * This method can also be used to initialize a simple rectangular * region. */ public void setOutputAreaXYWH(int x, int y, int w, int h) {
*** 635,645 **** /** * Returns a Region object that represents the intersection of this * object with the specified Region object. * <p> * If {@code A} and {@code B} are both Region Objects and ! * <code>C = A.getIntersection(B);</code> then a point will * be contained in {@code C} iff it is contained in both * {@code A} and {@code B}. * <p> * The return value may be this same object or the argument * Region object if no clipping occurs. --- 635,645 ---- /** * Returns a Region object that represents the intersection of this * object with the specified Region object. * <p> * If {@code A} and {@code B} are both Region Objects and ! * {@code C = A.getIntersection(B);} then a point will * be contained in {@code C} iff it is contained in both * {@code A} and {@code B}. * <p> * The return value may be this same object or the argument * Region object if no clipping occurs.
*** 664,674 **** /** * Returns a Region object that represents the union of this * object with the specified Region object. * <p> * If {@code A} and {@code B} are both Region Objects and ! * <code>C = A.getUnion(B);</code> then a point will * be contained in {@code C} iff it is contained in either * {@code A} or {@code B}. * <p> * The return value may be this same object or the argument * Region object if no augmentation occurs. --- 664,674 ---- /** * Returns a Region object that represents the union of this * object with the specified Region object. * <p> * If {@code A} and {@code B} are both Region Objects and ! * {@code C = A.getUnion(B);} then a point will * be contained in {@code C} iff it is contained in either * {@code A} or {@code B}. * <p> * The return value may be this same object or the argument * Region object if no augmentation occurs.
*** 691,701 **** /** * Returns a Region object that represents the difference of the * specified Region object subtracted from this object. * <p> * If {@code A} and {@code B} are both Region Objects and ! * <code>C = A.getDifference(B);</code> then a point will * be contained in {@code C} iff it is contained in * {@code A} but not contained in {@code B}. * <p> * The return value may be this same object or the argument * Region object if no clipping occurs. --- 691,701 ---- /** * Returns a Region object that represents the difference of the * specified Region object subtracted from this object. * <p> * If {@code A} and {@code B} are both Region Objects and ! * {@code C = A.getDifference(B);} then a point will * be contained in {@code C} iff it is contained in * {@code A} but not contained in {@code B}. * <p> * The return value may be this same object or the argument * Region object if no clipping occurs.
*** 715,725 **** /** * Returns a Region object that represents the exclusive or of this * object with the specified Region object. * <p> * If {@code A} and {@code B} are both Region Objects and ! * <code>C = A.getExclusiveOr(B);</code> then a point will * be contained in {@code C} iff it is contained in either * {@code A} or {@code B}, but not if it is contained in both. * <p> * The return value may be this same object or the argument * Region object if either is empty. --- 715,725 ---- /** * Returns a Region object that represents the exclusive or of this * object with the specified Region object. * <p> * If {@code A} and {@code B} are both Region Objects and ! * {@code C = A.getExclusiveOr(B);} then a point will * be contained in {@code C} iff it is contained in either * {@code A} or {@code B}, but not if it is contained in both. * <p> * The return value may be this same object or the argument * Region object if either is empty.
< prev index next >