Package org.apache.poi.sl.draw
Class DrawPaint
java.lang.Object
org.apache.poi.sl.draw.DrawPaint
This class handles color transformations.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Color
applyColorTransform
(ColorStyle color) Convert color transformations inColorStyle
to aColor
instanceprotected 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) getPaint
(Graphics2D graphics, PaintStyle 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 float
lin2srgb
(int linRGB) Convert linear RGB [0..100000] to sRGB float component [0..1]static int
srgb2lin
(float sRGB) Convert sRGB float component [0..1] from sRGB to linear RGB [0..100000]
-
Field Details
-
shape
-
-
Constructor Details
-
DrawPaint
-
-
Method Details
-
createSolidPaint
-
createSolidPaint
-
getPaint
-
getPaint
-
getSolidPaint
protected Paint getSolidPaint(PaintStyle.SolidPaint fill, Graphics2D graphics, PaintStyle.PaintModifier modifier) -
getGradientPaint
-
getTexturePaint
-
applyColorTransform
Convert color transformations inColorStyle
to aColor
instance- See Also:
-
createLinearGradientPaint
-
createRadialGradientPaint
-
createPathGradientPaint
-
HSL2RGB
Convert HSL values to a RGB Color.- Parameters:
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 - 1- Returns:
- the RGB Color object
-
srgb2lin
public static int srgb2lin(float sRGB) Convert sRGB float component [0..1] from sRGB to linear RGB [0..100000]- See Also:
-
lin2srgb
public static float lin2srgb(int linRGB) Convert linear RGB [0..100000] to sRGB float component [0..1]- See Also:
-