|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.poi.sl.draw.DrawPaint
public class DrawPaint
This class handles color transformations.
Field Summary | |
---|---|
protected PlaceableShape<?,?> |
shape
|
Constructor Summary | |
---|---|
DrawPaint(PlaceableShape<?,?> shape)
|
Method Summary | |
---|---|
static java.awt.Color |
applyColorTransform(ColorStyle color)
Convert color transformations in ColorStyle to a Color instance |
protected java.awt.Paint |
createLinearGradientPaint(PaintStyle.GradientPaint fill,
java.awt.Graphics2D graphics)
|
protected java.awt.Paint |
createPathGradientPaint(PaintStyle.GradientPaint fill,
java.awt.Graphics2D graphics)
|
protected java.awt.Paint |
createRadialGradientPaint(PaintStyle.GradientPaint fill,
java.awt.Graphics2D graphics)
|
static PaintStyle.SolidPaint |
createSolidPaint(java.awt.Color color)
|
static PaintStyle.SolidPaint |
createSolidPaint(ColorStyle color)
|
protected java.awt.Paint |
getGradientPaint(PaintStyle.GradientPaint fill,
java.awt.Graphics2D graphics)
|
java.awt.Paint |
getPaint(java.awt.Graphics2D graphics,
PaintStyle paint)
|
java.awt.Paint |
getPaint(java.awt.Graphics2D graphics,
PaintStyle paint,
PaintStyle.PaintModifier modifier)
|
protected java.awt.Paint |
getSolidPaint(PaintStyle.SolidPaint fill,
java.awt.Graphics2D graphics,
PaintStyle.PaintModifier modifier)
|
protected java.awt.Paint |
getTexturePaint(PaintStyle.TexturePaint fill,
java.awt.Graphics2D graphics)
|
static java.awt.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] |
protected void |
snapToAnchor(java.awt.geom.Point2D p,
java.awt.geom.Rectangle2D anchor)
|
static int |
srgb2lin(float sRGB)
Convert sRGB float component [0..1] from sRGB to linear RGB [0..100000] |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected PlaceableShape<?,?> shape
Constructor Detail |
---|
public DrawPaint(PlaceableShape<?,?> shape)
Method Detail |
---|
public static PaintStyle.SolidPaint createSolidPaint(java.awt.Color color)
public static PaintStyle.SolidPaint createSolidPaint(ColorStyle color)
public java.awt.Paint getPaint(java.awt.Graphics2D graphics, PaintStyle paint)
public java.awt.Paint getPaint(java.awt.Graphics2D graphics, PaintStyle paint, PaintStyle.PaintModifier modifier)
protected java.awt.Paint getSolidPaint(PaintStyle.SolidPaint fill, java.awt.Graphics2D graphics, PaintStyle.PaintModifier modifier)
protected java.awt.Paint getGradientPaint(PaintStyle.GradientPaint fill, java.awt.Graphics2D graphics)
protected java.awt.Paint getTexturePaint(PaintStyle.TexturePaint fill, java.awt.Graphics2D graphics)
public static java.awt.Color applyColorTransform(ColorStyle color)
ColorStyle
to a Color
instance
protected java.awt.Paint createLinearGradientPaint(PaintStyle.GradientPaint fill, java.awt.Graphics2D graphics)
protected java.awt.Paint createRadialGradientPaint(PaintStyle.GradientPaint fill, java.awt.Graphics2D graphics)
protected java.awt.Paint createPathGradientPaint(PaintStyle.GradientPaint fill, java.awt.Graphics2D graphics)
protected void snapToAnchor(java.awt.geom.Point2D p, java.awt.geom.Rectangle2D anchor)
public static java.awt.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 - 1
public static int srgb2lin(float sRGB)
Color.getRGBColorComponents(float[])
public static float lin2srgb(int linRGB)
Color.getRGBColorComponents(float[])
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |