jdk/src/share/classes/java/awt/RadialGradientPaint.java
changeset 9464 ae693a9d5112
parent 9035 1255eb81cc2f
child 20451 4cedf4e1560a
equal deleted inserted replaced
9463:29964a39b3f7 9464:ae693a9d5112
    47  * and the last color to the perimeter of the circle, interpolating
    47  * and the last color to the perimeter of the circle, interpolating
    48  * smoothly for any in-between colors specified by the user.  Any line drawn
    48  * smoothly for any in-between colors specified by the user.  Any line drawn
    49  * from the focus point to the circumference will thus span all the gradient
    49  * from the focus point to the circumference will thus span all the gradient
    50  * colors.
    50  * colors.
    51  * <p>
    51  * <p>
    52  * Specifying a focus point outside of the circle's radius will result in the
    52  * Specifying a focus point outside of the radius of the circle will cause
    53  * focus being set to the intersection point of the focus-center line and the
    53  * the rings of the gradient pattern to be centered on the point just inside
    54  * perimeter of the circle.
    54  * the edge of the circle in the direction of the focus point.
       
    55  * The rendering will internally use this modified location as if it were
       
    56  * the specified focus point.
    55  * <p>
    57  * <p>
    56  * The user must provide an array of floats specifying how to distribute the
    58  * The user must provide an array of floats specifying how to distribute the
    57  * colors along the gradient.  These values should range from 0.0 to 1.0 and
    59  * colors along the gradient.  These values should range from 0.0 to 1.0 and
    58  * act like keyframes along the gradient (they mark where the gradient should
    60  * act like keyframes along the gradient (they mark where the gradient should
    59  * be exactly a particular color).
    61  * be exactly a particular color).
   619         return new Point2D.Double(center.getX(), center.getY());
   621         return new Point2D.Double(center.getX(), center.getY());
   620     }
   622     }
   621 
   623 
   622     /**
   624     /**
   623      * Returns a copy of the focus point of the radial gradient.
   625      * Returns a copy of the focus point of the radial gradient.
       
   626      * Note that if the focus point specified when the radial gradient
       
   627      * was constructed lies outside of the radius of the circle, this
       
   628      * method will still return the original focus point even though
       
   629      * the rendering may center the rings of color on a different
       
   630      * point that lies inside the radius.
   624      *
   631      *
   625      * @return a {@code Point2D} object that is a copy of the focus point
   632      * @return a {@code Point2D} object that is a copy of the focus point
   626      */
   633      */
   627     public Point2D getFocusPoint() {
   634     public Point2D getFocusPoint() {
   628         return new Point2D.Double(focus.getX(), focus.getY());
   635         return new Point2D.Double(focus.getX(), focus.getY());