Class RMShadowEffect

All Implemented Interfaces:
Archivable, DeepChangeListener, RMPropertyChanger, PropertyChangeListener, Cloneable, EventListener

public class RMShadowEffect extends RMImageEffect
This class adds a shadow to a given shape.
  • Constructor Details

    • RMShadowEffect

      public RMShadowEffect()
      Creates a new shadow effect.
    • RMShadowEffect

      public RMShadowEffect(RMColor aColor, int aRadius, int dx, int dy)
      Creates a new shadow effect with the parameters.
  • Method Details

    • getRadius

      public int getRadius()
      Returns the radius of the blur.
    • getDX

      public int getDX()
      Returns the X offset of the shadow.
    • getDY

      public int getDY()
      Returns the Y offset of the shadow.
    • getColor

      public RMColor getColor()
      Returns the color associated with this fill.
    • setColor

      public void setColor(RMColor aColor)
      Sets the color associated with this fill.
    • deriveFill

      public RMShadowEffect deriveFill(int aRadius)
      Returns a shadow effect just like this one, but with a radius equal to the given value.
    • deriveFill

      public RMShadowEffect deriveFill(RMColor aColor)
      Returns a shadow effect just like this one, but with a radius equal to the given value.
    • deriveFill

      public RMShadowEffect deriveFill(int dx, int dy)
      Returns a shadow effect just like this one, but with new offsets.
    • getBounds

      public RMRect getBounds(RMShape aShape)
      Returns the bounds required to render this fill for this shape.
      Overrides:
      getBounds in class RMEffect
    • getImage

      public BufferedImage getImage(RMShape aShape)
      Returns the effect image.
      Specified by:
      getImage in class RMImageEffect
    • paint

      public void paint(RMShapePainter aPntr, RMShape aShape)
      Render this fill in a painter.
      Overrides:
      paint in class RMEffect
    • equals

      public boolean equals(Object anObj)
      Standard equals implementation.
      Overrides:
      equals in class Object
    • toXML

      public RXElement toXML(RXArchiver anArchiver)
      XML archival.
      Specified by:
      toXML in interface Archivable
      Overrides:
      toXML in class RMEffect
    • fromXML

      public Object fromXML(RXArchiver anArchiver, RXElement anElement)
      XML unarchival.
      Specified by:
      fromXML in interface Archivable
      Overrides:
      fromXML in class RMEffect