public interface Paint

Known subtypesConicGradient, Gradient, LinearGradient, LinearGradientPaint, MultipleGradientPaint, RadialGradient

An interface for providing custom painting such as gradients.

Methods

public abstract void paint(Graphics g, Rectangle2D bounds)Paints in the given bounds.
public abstract void paint(Graphics g, double x, double y, double w, double h)Paints in the given bounds.

Method details

paint

public abstract void paint(Graphics g, Rectangle2D bounds)
Paints in the given bounds.

Parameters

g Graphics
Graphics context to paint in.
bounds Rectangle2D
Bounds to paint in. User coordinates.

paint

public abstract void paint(Graphics g, double x, double y, double w, double h)
Paints in the given bounds.

Parameters

g Graphics
Graphics context to paint in.
x double
x coordinate. User space.
y double
y coordinate. USer space.
w double
width. User space.
h double
Hight. User space.