public class RMReflectionEffect extends RMImageEffect
RMImageEffect.BoxKernel, RMImageEffect.ConeKernel, RMImageEffect.GaussianKernel
Constructor and Description |
---|
RMReflectionEffect() |
Modifier and Type | Method and Description |
---|---|
RMReflectionEffect |
deriveEffect(float aReflectionHeight,
float aFadeHeight,
float aGapHeight)
Creates a new reflection effect by cloning this one and substituting given reflection, fade and gap heights,
if greater than zero.
|
boolean |
equals(java.lang.Object anObj)
Standard equals implementation.
|
java.lang.Object |
fromXML(RXArchiver anArchiver,
RXElement anElement)
XML unarchival.
|
RMRect |
getBounds(RMShape aShape)
Returns the bounds required to render this fill for this shape.
|
float |
getFadeHeight()
Returns the height of the faded region as a fraction of reflection height (defaults to .5).
|
float |
getGapHeight()
Returns the height of the gap between the shape and the reflection in points (defaults to 0).
|
java.awt.image.BufferedImage |
getImage(RMShape aShape)
Returns the effect image.
|
float |
getReflectionHeight()
Returns the height of the reflected image as fraction of shape height (defaults to 1).
|
void |
paint(RMShapePainter aPntr,
RMShape aShape)
Render this fill in a Java2D Graphics2D.
|
protected void |
setFadeHeight(float aValue)
Sets the height of the faded region as a fraction of reflection height.
|
protected void |
setGapHeight(float aValue)
Sets the height of the gap between the shape and the reflection in points.
|
protected void |
setReflectionHeight(float aValue)
Sets the height of the reflected image as fraction of shape height.
|
RXElement |
toXML(RXArchiver anArchiver)
XML archival.
|
clone, getBlurredImage, getBlurredImage, getCachedImage, getShapeImage, reset
deepChange, getName, isEnabled, propertyChange, setEnabled, toString
addPropertyChangeListener, animUpdate, firePropertyChange, firePropertyChange, firePropertyChange, getPCEvent, removePropertyChangeListener, sendPropertyChange
addListener, getListener, getListenerCount, getListenerCount, getListenerList, getListeners, hasListeners, removeListener
public float getReflectionHeight()
protected void setReflectionHeight(float aValue)
public float getFadeHeight()
protected void setFadeHeight(float aValue)
public float getGapHeight()
protected void setGapHeight(float aValue)
public RMReflectionEffect deriveEffect(float aReflectionHeight, float aFadeHeight, float aGapHeight)
public RMRect getBounds(RMShape aShape)
public java.awt.image.BufferedImage getImage(RMShape aShape)
getImage
in class RMImageEffect
public void paint(RMShapePainter aPntr, RMShape aShape)
public boolean equals(java.lang.Object anObj)
equals
in class java.lang.Object
public RXElement toXML(RXArchiver anArchiver)
toXML
in interface Archivable
toXML
in class RMEffect
public java.lang.Object fromXML(RXArchiver anArchiver, RXElement anElement)
fromXML
in interface Archivable
fromXML
in class RMEffect