Java java.awt GradientPaint fields, constructors, methods, implement or subclass

Example usage for Java java.awt GradientPaint fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for java.awt GradientPaint.

The text is from its open source code.

Constructor

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)
Constructs a simple acyclic GradientPaint object.
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(Point2D pt1, Color color1, Point2D pt2, Color color2, boolean cyclic)
Constructs either a cyclic or acyclic GradientPaint object depending on the boolean parameter.

Method

PaintContextcreateContext(ColorModel cm, Rectangle deviceBounds, Rectangle2D userBounds, AffineTransform xform, RenderingHints hints)
Creates and returns a PaintContext used to generate a linear color gradient pattern.
ColorgetColor1()
Returns the color C1 anchored by the point P1.
ColorgetColor2()
Returns the color C2 anchored by the point P2.
Point2DgetPoint1()
Returns a copy of the point P1 that anchors the first color.
Point2DgetPoint2()
Returns a copy of the point P2 which anchors the second color.
intgetTransparency()
Returns the transparency mode for this GradientPaint .
booleanisCyclic()
Returns true if the gradient cycles repeatedly between the two colors C1 and C2.