public class DrawPaint extends Object
| Modifier and Type | Field and Description |
|---|---|
protected PlaceableShape<?,?> |
shape |
| Constructor and Description |
|---|
DrawPaint(PlaceableShape<?,?> shape) |
| Modifier and Type | Method and Description |
|---|---|
static Color |
applyColorTransform(ColorStyle color)
Convert color transformations in
ColorStyle to a Color instance |
protected Paint |
createLinearGradientPaint(PaintStyle.GradientPaint fill,
Graphics2D graphics) |
protected Paint |
createPathGradientPaint(PaintStyle.GradientPaint fill,
Graphics2D graphics) |
protected Paint |
createRadialGradientPaint(PaintStyle.GradientPaint fill,
Graphics2D graphics) |
static PaintStyle.SolidPaint |
createSolidPaint(Color color) |
static PaintStyle.SolidPaint |
createSolidPaint(ColorStyle color) |
protected Paint |
getGradientPaint(PaintStyle.GradientPaint fill,
Graphics2D graphics) |
Paint |
getPaint(Graphics2D graphics,
PaintStyle paint) |
Paint |
getPaint(Graphics2D graphics,
PaintStyle paint,
PaintStyle.PaintModifier modifier) |
protected Paint |
getSolidPaint(PaintStyle.SolidPaint fill,
Graphics2D graphics,
PaintStyle.PaintModifier modifier) |
protected Paint |
getTexturePaint(PaintStyle.TexturePaint fill,
Graphics2D graphics) |
static Color |
HSL2RGB(double h,
double s,
double l,
double alpha)
Convert HSL values to a RGB Color.
|
static double[] |
RGB2HSL(Color color)
Convert a RGB Color to it corresponding HSL values.
|
static double[] |
RGB2SCRGB(Color color)
Convert sRGB Color to scRGB [0..1] (0:red,1:green,2:blue).
|
static Color |
SCRGB2RGB(double... scRGB)
Convert scRGB [0..1] components (0:red,1:green,2:blue) to sRGB Color.
|
protected PlaceableShape<?,?> shape
public DrawPaint(PlaceableShape<?,?> shape)
public static PaintStyle.SolidPaint createSolidPaint(Color color)
public static PaintStyle.SolidPaint createSolidPaint(ColorStyle color)
public Paint getPaint(Graphics2D graphics, PaintStyle paint)
public Paint getPaint(Graphics2D graphics, PaintStyle paint, PaintStyle.PaintModifier modifier)
protected Paint getSolidPaint(PaintStyle.SolidPaint fill, Graphics2D graphics, PaintStyle.PaintModifier modifier)
protected Paint getGradientPaint(PaintStyle.GradientPaint fill, Graphics2D graphics)
protected Paint getTexturePaint(PaintStyle.TexturePaint fill, Graphics2D graphics)
public static Color applyColorTransform(ColorStyle color)
ColorStyle to a Color instanceprotected Paint createLinearGradientPaint(PaintStyle.GradientPaint fill, Graphics2D graphics)
protected Paint createRadialGradientPaint(PaintStyle.GradientPaint fill, Graphics2D graphics)
protected Paint createPathGradientPaint(PaintStyle.GradientPaint fill, Graphics2D graphics)
public static Color HSL2RGB(double h, double s, double l, double alpha)
h - Hue is specified as degrees in the range 0 - 360.s - Saturation is specified as a percentage in the range 1 - 100.l - Luminance is specified as a percentage in the range 1 - 100.alpha - the alpha value between 0 - 1public static double[] RGB2HSL(Color color)
public static double[] RGB2SCRGB(Color color)
public static Color SCRGB2RGB(double... scRGB)