Class RMShadowFill

  • All Implemented Interfaces:
    RMArchiver.Archiving, java.lang.Cloneable

    public class RMShadowFill
    extends RMImageFill
    This class adds a shadow to a given shape.
    • Constructor Detail

      • RMShadowFill

        public RMShadowFill()
        Creates a new shadow fill.
    • Method Detail

      • 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.
      • deriveFill

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

        public RMFill deriveFill​(RMColor aColor)
        Returns a shadow fill just like this one, but with a radius equal to the given value.
        Overrides:
        deriveFill in class RMImageFill
      • deriveFill

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

        public RMRect getBounds​(RMShape aShape,
                                RMRect pathBounds)
        Returns the bounds required to render this fill for this shape.
        Overrides:
        getBounds in class RMFill
      • getImageBounds

        public RMRect getImageBounds​(RMRect boundsRect)
        Overrides normal image fill behavior to to account for shadow fringes and shadow offset.
        Overrides:
        getImageBounds in class RMImageFill
      • shouldClipToPath

        public boolean shouldClipToPath()
        Overrides normal image fill behavior to suppress clip to path, since shadow is an image of path.
        Overrides:
        shouldClipToPath in class RMImageFill
      • equals

        public boolean equals​(java.lang.Object anObj)
        Standard equals implementation.
        Overrides:
        equals in class RMImageFill