|
Java Platform 1.2 Beta 4 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.GradientPaint
Paint
,
Graphics2D.setPaint(java.awt.Paint)
Constructor Summary | |
GradientPaint(float x1,
float y1,
Color color1,
float x2,
float y2,
Color color2,
boolean cyclic)
Constructs either a cyclic or acyclic GradientPaint object depending on the boolean parameter. |
|
GradientPaint(float x1,
float y1,
Color color1,
float x2,
float y2,
Color color2)
Constructs a simple acyclic GradientPaint object. |
|
GradientPaint(Point2D pt1,
Color color1,
Point2D pt2,
Color color2,
boolean cyclic)
Constructs either a cyclic or acyclic GradientPaint object depending on the boolean parameter. |
|
GradientPaint(Point2D pt1,
Color color1,
Point2D pt2,
Color color2)
Constructs a simple acyclic GradientPaint object. |
Method Summary | |
PaintContext | createContext(ColorModel cm,
Rectangle deviceBounds,
Rectangle2D userBounds,
AffineTransform xform,
RenderingHints hints)
Creates and returns a context used to generate the color pattern. |
int | getTransparency()
Return the transparency mode for this GradientPaint. |
Methods inherited from class java.lang.Object | |
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait |
Constructor Detail |
public GradientPaint(float x1, float y1, Color color1, float x2, float y2, Color color2)
x1,y1
- Coordinates of the 1st point in user space.
color1
- Color at the 1st point.
x2,y2
- Coordinates of the 2nd point in user space.
color2
- Color at the 2nd point.public GradientPaint(Point2D pt1, Color color1, Point2D pt2, Color color2)
pt1
- Coordinates of the 1st point in user space.
color1
- Color at the 1st point.
pt2
- Coordinates of the 2nd point in user space.
color2
- Color at the 2nd point.public GradientPaint(float x1, float y1, Color color1, float x2, float y2, Color color2, boolean cyclic)
x1,y1
- Coordinates of the 1st point in user space.
color1
- Color at the 1st point.
x2,y2
- Coordinates of the 2nd point in user space.
color2
- Color at the 2nd point.
cyclic
- true if the gradient pattern should cycle
repeatedly between the two colors.public GradientPaint(Point2D pt1, Color color1, Point2D pt2, Color color2, boolean cyclic)
pt1
- Coordinates of the 1st point in user space.
color1
- Color at the 1st point.
pt2
- Coordinates of the 2nd point in user space.
color2
- Color at the 2nd point.
cyclic
- true if the gradient pattern should cycle
repeatedly between the two colors.Method Detail |
public PaintContext createContext(ColorModel cm, Rectangle deviceBounds, Rectangle2D userBounds, AffineTransform xform, RenderingHints hints)
cm
- ColorModel in which the caller wishes to receive the
paint data. This is used only as a hint.
deviceBounds
- The rectangle describing the bounding box in
device space of the graphics primitive being rendered.
userBounds
- The rectangle describing the bounding box in
user space of the graphics primitive being rendered.
xform
- The Transform from user space into device space.PaintContext
public int getTransparency()
Transparency
|
Java Platform 1.2 Beta 4 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |