jdk/src/share/classes/java/awt/RadialGradientPaint.java
changeset 20451 4cedf4e1560a
parent 9464 ae693a9d5112
child 21244 7c2ac5ca05a2
equal deleted inserted replaced
20450:008da09ac2b2 20451:4cedf4e1560a
    78  * setting {@code CycleMethod} to either {@code REFLECTION} or {@code REPEAT}.
    78  * setting {@code CycleMethod} to either {@code REFLECTION} or {@code REPEAT}.
    79  * The gradient color proportions are equal for any particular line drawn
    79  * The gradient color proportions are equal for any particular line drawn
    80  * from the focus point. The following figure shows that the distance AB
    80  * from the focus point. The following figure shows that the distance AB
    81  * is equal to the distance BC, and the distance AD is equal to the distance DE.
    81  * is equal to the distance BC, and the distance AD is equal to the distance DE.
    82  * <center>
    82  * <center>
    83  * <img src = "doc-files/RadialGradientPaint-3.png">
    83  * <img src = "doc-files/RadialGradientPaint-3.png" alt="RadialGradientPaint-3">
    84  * </center>
    84  * </center>
    85  * If the gradient and graphics rendering transforms are uniformly scaled and
    85  * If the gradient and graphics rendering transforms are uniformly scaled and
    86  * the user sets the focus so that it coincides with the center of the circle,
    86  * the user sets the focus so that it coincides with the center of the circle,
    87  * the gradient color proportions are equal for any line drawn from the center.
    87  * the gradient color proportions are equal for any line drawn from the center.
    88  * The following figure shows the distances AB, BC, AD, and DE. They are all equal.
    88  * The following figure shows the distances AB, BC, AD, and DE. They are all equal.
    89  * <center>
    89  * <center>
    90  * <img src = "doc-files/RadialGradientPaint-4.png">
    90  * <img src = "doc-files/RadialGradientPaint-4.png" alt="RadialGradientPaint-4">
    91  * </center>
    91  * </center>
    92  * Note that some minor variations in distances may occur due to sampling at
    92  * Note that some minor variations in distances may occur due to sampling at
    93  * the granularity of a pixel.
    93  * the granularity of a pixel.
    94  * If no cycle method is specified, {@code NO_CYCLE} will be chosen by
    94  * If no cycle method is specified, {@code NO_CYCLE} will be chosen by
    95  * default, which means the the last keyframe color will be used to fill the
    95  * default, which means the the last keyframe color will be used to fill the
   115  * <p>
   115  * <p>
   116  * This image demonstrates the example code above, with default
   116  * This image demonstrates the example code above, with default
   117  * (centered) focus for each of the three cycle methods:
   117  * (centered) focus for each of the three cycle methods:
   118  * <p>
   118  * <p>
   119  * <center>
   119  * <center>
   120  * <img src = "doc-files/RadialGradientPaint-1.png">
   120  * <img src = "doc-files/RadialGradientPaint-1.png" alt="RadialGradientPaint-1">
   121  * </center>
   121  * </center>
   122  *
   122  *
   123  * <p>
   123  * <p>
   124  * It is also possible to specify a non-centered focus point, as
   124  * It is also possible to specify a non-centered focus point, as
   125  * in the following code:
   125  * in the following code:
   139  * <p>
   139  * <p>
   140  * This image demonstrates the previous example code, with non-centered
   140  * This image demonstrates the previous example code, with non-centered
   141  * focus for each of the three cycle methods:
   141  * focus for each of the three cycle methods:
   142  * <p>
   142  * <p>
   143  * <center>
   143  * <center>
   144  * <img src = "doc-files/RadialGradientPaint-2.png">
   144  * <img src = "doc-files/RadialGradientPaint-2.png" alt="RadialGradientPaint-2">
   145  * </center>
   145  * </center>
   146  *
   146  *
   147  * @see java.awt.Paint
   147  * @see java.awt.Paint
   148  * @see java.awt.Graphics2D#setPaint
   148  * @see java.awt.Graphics2D#setPaint
   149  * @author Nicholas Talian, Vincent Hardy, Jim Graham, Jerry Evans
   149  * @author Nicholas Talian, Vincent Hardy, Jim Graham, Jerry Evans