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 ColorapplyColorTransform(ColorStyle color) Convert color transformations inColorStyleto aColorinstanceprotected PaintcreateLinearGradientPaint(PaintStyle.GradientPaint fill, Graphics2D graphics) protected PaintcreatePathGradientPaint(PaintStyle.GradientPaint fill, Graphics2D graphics) protected PaintcreateRadialGradientPaint(PaintStyle.GradientPaint fill, Graphics2D graphics) static PaintStyle.SolidPaintcreateSolidPaint(Color color) static PaintStyle.SolidPaintcreateSolidPaint(ColorStyle color) protected PaintgetGradientPaint(PaintStyle.GradientPaint fill, Graphics2D graphics) getPaint(Graphics2D graphics, PaintStyle paint) getPaint(Graphics2D graphics, PaintStyle paint, PaintStyle.PaintModifier modifier) protected PaintgetSolidPaint(PaintStyle.SolidPaint fill, Graphics2D graphics, PaintStyle.PaintModifier modifier) protected PaintgetTexturePaint(PaintStyle.TexturePaint fill, Graphics2D graphics) static ColorHSL2RGB(double h, double s, double l, double alpha) Convert HSL values to a RGB Color.static double[]Convert a RGB Color to it corresponding HSL values.static double[]Convert sRGB Color to scRGB [0..1] (0:red,1:green,2:blue).static ColorSCRGB2RGB(double... scRGB) Convert scRGB [0..1] components (0:red,1:green,2:blue) to sRGB Color.
-
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 inColorStyleto aColorinstance -
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
-
RGB2HSL
Convert a RGB Color to it corresponding HSL values.- Returns:
- an array containing the 3 HSL values.
-
RGB2SCRGB
Convert sRGB Color to scRGB [0..1] (0:red,1:green,2:blue). Alpha needs to be handled separately.- See Also:
-
SCRGB2RGB
Convert scRGB [0..1] components (0:red,1:green,2:blue) to sRGB Color. Alpha needs to be handled separately.- See Also:
-