com.smardec.asc.gradient
Class QuickGradientPaint
java.lang.Object
|
+--com.smardec.asc.gradient.QuickGradientPaint
- All Implemented Interfaces:
- java.awt.Paint, java.awt.Transparency
- public class QuickGradientPaint
- extends java.lang.Object
- implements java.awt.Paint
QuickGradientPaint is a Paint object that draws gradient fills
much more faster than standard's Java java.awt.GradientPaint class.
| Fields inherited from interface java.awt.Transparency |
BITMASK, OPAQUE, TRANSLUCENT |
|
Constructor Summary |
QuickGradientPaint(java.awt.Color startColor,
java.awt.Color endColor,
boolean isVertical)
Creates QuickGradientPaint object with specified colors and direction. |
|
Method Summary |
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)
Creates and returns a PaintContext used to
generate the color pattern. |
int |
getTransparency()
Returns the type of transparency. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
QuickGradientPaint
public QuickGradientPaint(java.awt.Color startColor,
java.awt.Color endColor,
boolean isVertical)
- Creates
QuickGradientPaint object with specified colors and direction.
- Parameters:
startColor - The start color for gradient fillendColor - The end color for gradient fillisVertical - true if vertical gradient is painted,
false if horizontal gradient is painted
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)
- Creates and returns a
PaintContext used to
generate the color pattern.
- Specified by:
createContext in interface java.awt.Paint
- Parameters:
cm - the ColorModel that receives the
Paint data. This is used only as a hintdeviceBounds - the device space bounding box of the graphics primitive being rendereduserBounds - the user space bounding box of the graphics primitive being renderedxform - the AffineTransform from user space into device spacehints - the hint that the context object uses to choose between rendering alternatives
- Returns:
- the
PaintContext for generating color patterns. - See Also:
PaintContext
getTransparency
public int getTransparency()
- Returns the type of transparency.
- Specified by:
getTransparency in interface java.awt.Transparency
- Returns:
- The field type of is transparency, which is either
OPAQUE or TRANSLUCENT.
Copyright © 2003-2006 Smardec. All Rights Reserved.