|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.diamondspin.DSShadowManager
public class DSShadowManager
from Romain Guy's code.
Field Summary | |
---|---|
protected DSFrame |
element
|
protected double |
shadowAdditionnalAngle
|
protected Shape |
shadowClip
|
protected ConvolveOp |
shadowConvolveOp
|
protected int |
shadowDistance
|
protected int |
shadowDistance_x
|
protected int |
shadowDistance_y
|
protected boolean |
shadowHighQuality
|
protected BufferedImage |
shadowImage
|
protected float |
shadowOpacity
|
protected int |
shadowSize
|
protected double |
shadowSourceAlpha
|
protected double |
shadowSourceD
|
protected Image |
sourceImage
|
Constructor Summary | |
---|---|
DSShadowManager(DSFrame frame)
Constructs a DSShadowManager |
Method Summary | |
---|---|
protected void |
applyShadow(BufferedImage image,
Color shadowColor_arg)
|
protected void |
computeShadowPosition()
compute the angle the the gap between document and shadow |
protected BufferedImage |
createShadowMask(BufferedImage image,
Color shadowColor)
|
protected ConvolveOp |
getLinearBlurOp(int size)
|
double |
getShadowAdditionnalAngle()
return an option of the shadow called AdditionnalAngle which is added to the computed angle |
Shape |
getShadowClip()
set an optionql clip to the shqdow (the region on which the shadow can be displayed) |
int |
getShadowDistance()
|
BufferedImage |
getShadowImage()
return the last shadow image produced |
Point |
getShadowPosition()
return shadow offset |
int |
getShadowSize()
return how far the shadow get blurred |
boolean |
isShadowHighQuality()
tells what quality is used to display the shadow. |
boolean |
isShadowSource()
return if the shadow is displayed against a light source or not |
void |
paintShadow(Graphics2D g)
paint the shadow with the given graphics (may be clipped) |
protected BufferedImage |
prepareImage(Image image)
|
void |
setShadowAdditionnalAngle(double shadowAdditionnalAngle)
set an option of the shadow called AdditionnalAngle which is added to the computed angle |
void |
setShadowClip(Shape shadowClip)
set an optionql clip to the shqdow (the region on which the shadow can be displayed) |
void |
setShadowDistance(int shadowDistance)
|
void |
setShadowHighQuality(boolean shadowHighQuality)
change what quality is used to display the shadow. |
void |
setShadowSource(double ssAlpha,
double ssD)
set the light source position used to find the angle of the light |
void |
setSourceImage(Image image)
|
void |
updateDropShadow(Color color)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected DSFrame element
protected boolean shadowHighQuality
protected transient BufferedImage shadowImage
protected transient Image sourceImage
protected double shadowAdditionnalAngle
protected double shadowSourceAlpha
protected double shadowSourceD
protected int shadowSize
protected float shadowOpacity
protected Shape shadowClip
protected int shadowDistance_x
protected int shadowDistance_y
protected int shadowDistance
protected transient ConvolveOp shadowConvolveOp
Constructor Detail |
---|
public DSShadowManager(DSFrame frame)
frame
- Method Detail |
---|
protected void applyShadow(BufferedImage image, Color shadowColor_arg)
protected void computeShadowPosition()
public Point getShadowPosition()
public int getShadowSize()
protected BufferedImage createShadowMask(BufferedImage image, Color shadowColor)
public BufferedImage getShadowImage()
public void paintShadow(Graphics2D g)
g
- the graphics object to paint withprotected BufferedImage prepareImage(Image image)
public void updateDropShadow(Color color)
public void setSourceImage(Image image)
protected final ConvolveOp getLinearBlurOp(int size)
public double getShadowAdditionnalAngle()
public boolean isShadowHighQuality()
public boolean isShadowSource()
public Shape getShadowClip()
public void setShadowClip(Shape shadowClip)
shadowClip
- the clip as a shapepublic void setShadowAdditionnalAngle(double shadowAdditionnalAngle)
shadowAdditionnalAngle
- public void setShadowHighQuality(boolean shadowHighQuality)
shadowHighQuality
- true is hightest quality is usedpublic void setShadowSource(double ssAlpha, double ssD)
ssAlpha
- angle of the source in polar coordinate systemssD
- distance of the source in polar coordinate systempublic int getShadowDistance()
public void setShadowDistance(int shadowDistance)
shadowDistance
- the shadowDistance to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |