java.lang.Object
com.arranger.jarl.trait.base.GradientColor
- All Implemented Interfaces:
- java.awt.Paint, java.awt.Transparency
- public class GradientColor
- extends java.lang.Object
- implements java.awt.Paint
GradientColor
Note: This is heavily based on java.awt.GradientPaintContext & java.awt.GradientPaint
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
m_gradient
protected Gradient m_gradient
cachedModel
static java.awt.image.ColorModel cachedModel
cached
static java.lang.ref.WeakReference cached
GradientColor
public GradientColor(Gradient gradient)
createContext
public java.awt.PaintContext createContext(java.awt.image.ColorModel cm,
java.awt.Rectangle deviceBounds,
java.awt.geom.Rectangle2D userBounds,
java.awt.geom.AffineTransform xform,
java.awt.RenderingHints hints)
- Description copied from interface:
java.awt.Paint
- Create the context necessary for performing the color pattern generation.
The color model is a hint, and may be null for Classpath implementations;
however some legacy code may throw a NullPointerException when passed a
null. Leaving the color model null provides the most efficiency and leeway
in the generation of the color pattern.
- Specified by:
createContext in interface java.awt.Paint
getTransparency
public int getTransparency()
- Description copied from interface:
java.awt.Transparency
- Return the transparency type.
- Specified by:
getTransparency in interface java.awt.Transparency
getGradient
public Gradient getGradient()
getCachedRaster
static java.awt.image.Raster getCachedRaster(java.awt.image.ColorModel cm,
int w,
int h)
putCachedRaster
static void putCachedRaster(java.awt.image.ColorModel cm,
java.awt.image.Raster ras)