Artenus 2D Framework
Artenus Reference
Renders the underlying entity with a shadow effect.
public class DropShadow
extends FilteredEntity

Field Summary

Fields inherited from com.annahid.libs.artenus.entities.FilteredEntity

Constructor Summary

Modifier and TypeConstructor and Description
public DropShadow(Entity target, float dx, float dy, float shadowAlpha)
Creates a new drop shadow effect with given parameters.
public DropShadow(Entity target)
Creates a new drop shadow effect for the given renderable entity.

Method Summary

Modifier and TypeMethod and Description
public voidrender(RenderingContext context, int flags)
Calls render on the underlying entity, with specified flags.
public DropShadowsetOffset(float dx, float dy)
Sets the position offset of this drop shadow effect.
public DropShadowsetShadowAlpha(float shadowAlpha)
Sets the alpha transparency value of the shadow.

Methods inherited from com.annahid.libs.artenus.entities.FilteredEntity

Methods inherited from java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

DropShadow
public  DropShadow(
    Entity target,
    float dx,
    float dy,
    float shadowAlpha
)
Creates a new drop shadow effect with given parameters.
Parameters:
targetThe renderable entity to apply the effect to
dxHorizontal position offset of the shadow
dyVertical position offset of the shadow
shadowAlphaTransparency value of the shadow
DropShadow
public  DropShadow(
    Entity target
)
Creates a new drop shadow effect for the given renderable entity.
Parameters:
targetThe renderable entity to apply the effect to

Method Detail

render
public void render(
    RenderingContext context,
    int flags
)
Calls render on the underlying entity, with specified flags.
Overrides:
setOffset
public DropShadow setOffset(
    float dx,
    float dy
)
Sets the position offset of this drop shadow effect.
Parameters:
dxHorizontal position offset of the shadow
dyVertical position offset of the shadow
Returns:
This instance
setShadowAlpha
public DropShadow setShadowAlpha(
    float shadowAlpha
)
Sets the alpha transparency value of the shadow.
Parameters:
shadowAlphaTransparency value of the shadow
Returns:
This instance