< prev index next >
src/java.desktop/share/classes/java/awt/RadialGradientPaint.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 2006, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
*** 77,98 ****
* takes when it is filling the space outside the circle's radius by
* setting {@code CycleMethod} to either {@code REFLECTION} or {@code REPEAT}.
* The gradient color proportions are equal for any particular line drawn
* from the focus point. The following figure shows that the distance AB
* is equal to the distance BC, and the distance AD is equal to the distance DE.
! * <center>
* <img src = "doc-files/RadialGradientPaint-3.png" alt="image showing the
* distance AB=BC, and AD=DE">
! * </center>
* If the gradient and graphics rendering transforms are uniformly scaled and
* the user sets the focus so that it coincides with the center of the circle,
* the gradient color proportions are equal for any line drawn from the center.
* The following figure shows the distances AB, BC, AD, and DE. They are all equal.
! * <center>
* <img src = "doc-files/RadialGradientPaint-4.png" alt="image showing the
* distance of AB, BC, AD, and DE are all equal">
! * </center>
* Note that some minor variations in distances may occur due to sampling at
* the granularity of a pixel.
* If no cycle method is specified, {@code NO_CYCLE} will be chosen by
* default, which means the last keyframe color will be used to fill the
* remaining area.
--- 77,98 ----
* takes when it is filling the space outside the circle's radius by
* setting {@code CycleMethod} to either {@code REFLECTION} or {@code REPEAT}.
* The gradient color proportions are equal for any particular line drawn
* from the focus point. The following figure shows that the distance AB
* is equal to the distance BC, and the distance AD is equal to the distance DE.
! * <p style="text-align:center">
* <img src = "doc-files/RadialGradientPaint-3.png" alt="image showing the
* distance AB=BC, and AD=DE">
! * <p>
* If the gradient and graphics rendering transforms are uniformly scaled and
* the user sets the focus so that it coincides with the center of the circle,
* the gradient color proportions are equal for any line drawn from the center.
* The following figure shows the distances AB, BC, AD, and DE. They are all equal.
! * <p style="text-align:center">
* <img src = "doc-files/RadialGradientPaint-4.png" alt="image showing the
* distance of AB, BC, AD, and DE are all equal">
! * <p>
* Note that some minor variations in distances may occur due to sampling at
* the granularity of a pixel.
* If no cycle method is specified, {@code NO_CYCLE} will be chosen by
* default, which means the last keyframe color will be used to fill the
* remaining area.
*** 114,128 ****
* </pre>
*
* <p>
* This image demonstrates the example code above, with default
* (centered) focus for each of the three cycle methods:
! * <center>
* <img src = "doc-files/RadialGradientPaint-1.png" alt="image showing the
* output of the sameple code">
- * </center>
- *
* <p>
* It is also possible to specify a non-centered focus point, as
* in the following code:
* <pre>
* Point2D center = new Point2D.Float(50, 50);
--- 114,126 ----
* </pre>
*
* <p>
* This image demonstrates the example code above, with default
* (centered) focus for each of the three cycle methods:
! * <p style="text-align:center">
* <img src = "doc-files/RadialGradientPaint-1.png" alt="image showing the
* output of the sameple code">
* <p>
* It is also possible to specify a non-centered focus point, as
* in the following code:
* <pre>
* Point2D center = new Point2D.Float(50, 50);
*** 137,150 ****
* </pre>
*
* <p>
* This image demonstrates the previous example code, with non-centered
* focus for each of the three cycle methods:
! * <center>
* <img src = "doc-files/RadialGradientPaint-2.png" alt="image showing the
* output of the sample code">
- * </center>
*
* @see java.awt.Paint
* @see java.awt.Graphics2D#setPaint
* @author Nicholas Talian, Vincent Hardy, Jim Graham, Jerry Evans
* @since 1.6
--- 135,147 ----
* </pre>
*
* <p>
* This image demonstrates the previous example code, with non-centered
* focus for each of the three cycle methods:
! * <p style="text-align:center">
* <img src = "doc-files/RadialGradientPaint-2.png" alt="image showing the
* output of the sample code">
*
* @see java.awt.Paint
* @see java.awt.Graphics2D#setPaint
* @author Nicholas Talian, Vincent Hardy, Jim Graham, Jerry Evans
* @since 1.6
< prev index next >