declare namespace java {
namespace awt {
/**
* The GradientPaint
class provides a way to fill
* a {@link Shape} with a linear color gradient pattern.
* If {@link Point} P1 with {@link Color} C1 and Point
P2 with
* Color
C2 are specified in user space, the
* Color
on the P1, P2 connecting line is proportionally
* changed from C1 to C2. Any point P not on the extended P1, P2
* connecting line has the color of the point P' that is the perpendicular
* projection of P on the extended P1, P2 connecting line.
* Points on the extended line outside of the P1, P2 segment can be colored
* in one of two ways.
*
Color
C1 while points on the P2 side
* have the constant Color
C2.
* GradientPaint
object.
* @param x1 x coordinate of the first specified
* Point
in user space
* @param y1 y coordinate of the first specified
* Point
in user space
* @param color1 Color
at the first specified
* Point
* @param x2 x coordinate of the second specified
* Point
in user space
* @param y2 y coordinate of the second specified
* Point
in user space
* @param color2 Color
at the second specified
* Point
* @throws NullPointerException if either one of colors is null
*/
// @ts-ignore
constructor(x1: number /*float*/, y1: number /*float*/, color1: java.awt.Color, x2: number /*float*/, y2: number /*float*/, color2: java.awt.Color)
/**
* Constructs a simple acyclic GradientPaint
object.
* @param pt1 the first specified Point
in user space
* @param color1 Color
at the first specified
* Point
* @param pt2 the second specified Point
in user space
* @param color2 Color
at the second specified
* Point
* @throws NullPointerException if either one of colors or points
* is null
*/
// @ts-ignore
constructor(pt1: java.awt.geom.Point2D, color1: java.awt.Color, pt2: java.awt.geom.Point2D, color2: java.awt.Color)
/**
* Constructs either a cyclic or acyclic GradientPaint
* object depending on the boolean
parameter.
* @param x1 x coordinate of the first specified
* Point
in user space
* @param y1 y coordinate of the first specified
* Point
in user space
* @param color1 Color
at the first specified
* Point
* @param x2 x coordinate of the second specified
* Point
in user space
* @param y2 y coordinate of the second specified
* Point
in user space
* @param color2 Color
at the second specified
* Point
* @param cyclic true
if the gradient pattern should cycle
* repeatedly between the two colors; false
otherwise
*/
// @ts-ignore
constructor(x1: number /*float*/, y1: number /*float*/, color1: java.awt.Color, x2: number /*float*/, y2: number /*float*/, color2: java.awt.Color, cyclic: boolean)
/**
* Constructs either a cyclic or acyclic GradientPaint
* object depending on the boolean
parameter.
* @param pt1 the first specified Point
* in user space
* @param color1 Color
at the first specified
* Point
* @param pt2 the second specified Point
* in user space
* @param color2 Color
at the second specified
* Point
* @param cyclic true
if the gradient pattern should cycle
* repeatedly between the two colors; false
otherwise
* @throws NullPointerException if either one of colors or points
* is null
*/
// @ts-ignore
constructor(pt1: java.awt.geom.Point2D, color1: java.awt.Color, pt2: java.awt.geom.Point2D, color2: java.awt.Color, cyclic: boolean)
/**
* Returns a copy of the point P1 that anchors the first color.
* @return a {#link Point2D} object that is a copy of the point
* that anchors the first color of this
* GradientPaint
.
*/
// @ts-ignore
public getPoint1(): java.awt.geom.Point2D
/**
* Returns the color C1 anchored by the point P1.
* @return a Color
object that is the color
* anchored by P1.
*/
// @ts-ignore
public getColor1(): java.awt.Color
/**
* Returns a copy of the point P2 which anchors the second color.
* @return a {#link Point2D} object that is a copy of the point
* that anchors the second color of this
* GradientPaint
.
*/
// @ts-ignore
public getPoint2(): java.awt.geom.Point2D
/**
* Returns the color C2 anchored by the point P2.
* @return a Color
object that is the color
* anchored by P2.
*/
// @ts-ignore
public getColor2(): java.awt.Color
/**
* Returns true
if the gradient cycles repeatedly
* between the two colors C1 and C2.
* @return true
if the gradient cycles repeatedly
* between the two colors; false
otherwise.
*/
// @ts-ignore
public isCyclic(): boolean
/**
* Creates and returns a {@link PaintContext} used to
* generate a linear color gradient pattern.
* See the {@link Paint#createContext specification} of the
* method in the {@link Paint} interface for information
* on null parameter handling.
* @param cm the preferred {#link ColorModel} which represents the most convenient
* format for the caller to receive the pixel data, or {@code null}
* if there is no preference.
* @param deviceBounds the device space bounding box
* of the graphics primitive being rendered.
* @param userBounds the user space bounding box
* of the graphics primitive being rendered.
* @param xform the {#link AffineTransform} from user
* space into device space.
* @param hints the set of hints that the context object can use to
* choose between rendering alternatives.
* @return the {#code PaintContext} for
* generating color patterns.
* @see Paint
* @see PaintContext
* @see ColorModel
* @see Rectangle
* @see Rectangle2D
* @see AffineTransform
* @see RenderingHints
*/
// @ts-ignore
public createContext(cm: java.awt.image.ColorModel, deviceBounds: java.awt.Rectangle, userBounds: java.awt.geom.Rectangle2D, xform: java.awt.geom.AffineTransform, hints: java.awt.RenderingHints): java.awt.PaintContext
/**
* Returns the transparency mode for this GradientPaint
.
* @return an integer value representing this GradientPaint
* object's transparency mode.
* @see Transparency
*/
// @ts-ignore
public getTransparency(): number /*int*/
}
}
}