Package snap.gfx
Class BlurEffect
java.lang.Object
snap.props.PropObject
snap.gfx.Effect
snap.gfx.BlurEffect
- All Implemented Interfaces:
PropChange.DoChange
,XMLArchiver.Archivable
An effect that performs a simple blur.
-
Field Summary
Fields inherited from class snap.props.PropObject
_pcs, EMPTY_OBJECT
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
applyEffect
(PainterDVR aPDVR, Painter aPntr, Rect aRect) Apply the effect from given DVR to painter.boolean
Standard equals implementation.fromXML
(XMLArchiver anArchiver, XMLElement anElement) XML unarchival.getBlurImage
(PainterDVR aPDVR, Rect aRect) Returns the blur image.Override to account for blur radius.getPropValue
(String aPropName) Override to support props for this class.double
Returns the radius.protected void
Override to configure props for this class.void
setPropValue
(String aPropName, Object aValue) Override to support props for this class.toXML
(XMLArchiver anArchiver) XML archival.Methods inherited from class snap.props.PropObject
addDeepChangeListener, addPropChangeListener, addPropChangeListener, clone, firePropChange, firePropChange, firePropChange, getPropDefault, getPropForName, getPropParent, getPropSet, getPropsForArchival, getPropsForArchivalExtra, getPropsString, isPropDefault, processPropChange, removeDeepChangeListener, removePropChangeListener, removePropChangeListener, setPropsString, setPropValues, toString, toStringProps
-
Field Details
-
Radius_Prop
- See Also:
-
DEFAULT_RADIUS
public static final double DEFAULT_RADIUS- See Also:
-
-
Constructor Details
-
BlurEffect
public BlurEffect()Constructor. -
BlurEffect
public BlurEffect(double aRadius) Constructor for given radius.
-
-
Method Details
-
getRadius
public double getRadius()Returns the radius. -
getBounds
Override to account for blur radius. -
applyEffect
Apply the effect from given DVR to painter.- Overrides:
applyEffect
in classEffect
-
getBlurImage
Returns the blur image. -
equals
Standard equals implementation. -
initProps
Override to configure props for this class.- Overrides:
initProps
in classPropObject
-
getPropValue
Override to support props for this class.- Overrides:
getPropValue
in classPropObject
-
setPropValue
Override to support props for this class.- Overrides:
setPropValue
in classPropObject
-
toXML
XML archival.- Specified by:
toXML
in interfaceXMLArchiver.Archivable
- Overrides:
toXML
in classEffect
-
fromXML
XML unarchival.- Specified by:
fromXML
in interfaceXMLArchiver.Archivable
- Overrides:
fromXML
in classEffect
-