Package snap.gfx
Class Effect
java.lang.Object
snap.props.PropObject
snap.gfx.Effect
- All Implemented Interfaces:
PropChange.DoChange
,XMLArchiver.Archivable
- Direct Known Subclasses:
BlurEffect
,EmbossEffect
,ReflectEffect
,ShadowEffect
A class to represent a visual effect that can be applied to drawing done in a Painter (like blur, shadow, etc.).
-
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.fromXML
(XMLArchiver anArchiver, XMLElement anElement) XML unarchival.Returns the bounds required to render this effect applied to given rect.getName()
Returns the name of the effect.static Effect
Parses an effect from given object.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, getPropValue, initProps, isPropDefault, processPropChange, removeDeepChangeListener, removePropChangeListener, removePropChangeListener, setPropsString, setPropValue, setPropValues, toString, toStringProps
-
Constructor Details
-
Effect
public Effect()Constructor.
-
-
Method Details
-
getName
Returns the name of the effect. -
getBounds
Returns the bounds required to render this effect applied to given rect. -
applyEffect
Apply the effect from given DVR to painter. -
toXML
XML archival.- Specified by:
toXML
in interfaceXMLArchiver.Archivable
-
fromXML
XML unarchival.- Specified by:
fromXML
in interfaceXMLArchiver.Archivable
-
of
Parses an effect from given object.
-