Class RMEmbossEffect
java.lang.Object
com.inductiveautomation.rm.base.RMListenerList
com.inductiveautomation.rm.base.RMObject
com.inductiveautomation.rm.graphics.RMEffect
com.inductiveautomation.rm.graphics.RMImageEffect
com.inductiveautomation.rm.graphics.RMEmbossEffect
- All Implemented Interfaces:
Archivable
,DeepChangeListener
,RMPropertyChanger
,PropertyChangeListener
,Cloneable
,EventListener
- Direct Known Subclasses:
RMChiselEffect
Renders a given shape with an emboss effect.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.inductiveautomation.rm.graphics.RMImageEffect
RMImageEffect.BoxKernel, RMImageEffect.ConeKernel, RMImageEffect.GaussianKernel
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new emboss effect.RMEmbossEffect
(float altitude, float azimuth, int radius) Creates a new emboss effect with given altitude, azimuth and radius. -
Method Summary
Modifier and TypeMethodDescriptionderiveEffect
(float newAltitude, float newAzimuth) Derive with new altitude and azimuth.deriveEffect
(int newRadius) Derive with new radius.void
emboss
(BufferedImage source, BufferedImage bump) Emboss a 24 bit source image according to a bump map.boolean
Standard equals implementation.fromXML
(RXArchiver anArchiver, RXElement anElement) XML unarchival.float
Returns altitude of light source.float
Returns angle of light source.Creates effect imageint
Returns radius of edge rounding.void
isolateHeightSample
(int[] bumpPixels, int w, int h) Converts the argb bumpSamples into an array of signed ints representing the height.void
paint
(RMShapePainter aPntr, RMShape aShape) Render this fill in a shape painter.toXML
(RXArchiver anArchiver) XML archival.Methods inherited from class com.inductiveautomation.rm.graphics.RMImageEffect
clone, getBlurredImage, getBlurredImage, getCachedImage, getShapeImage, reset
Methods inherited from class com.inductiveautomation.rm.graphics.RMEffect
deepChange, getBounds, getName, isEnabled, propertyChange, setEnabled, toString
Methods inherited from class com.inductiveautomation.rm.base.RMObject
addPropertyChangeListener, animUpdate, firePropertyChange, firePropertyChange, firePropertyChange, getPCEvent, removePropertyChangeListener, sendPropertyChange
Methods inherited from class com.inductiveautomation.rm.base.RMListenerList
addListener, getListener, getListenerCount, getListenerCount, getListenerList, getListeners, hasListeners, removeListener
-
Constructor Details
-
RMEmbossEffect
public RMEmbossEffect()Creates a new emboss effect. -
RMEmbossEffect
public RMEmbossEffect(float altitude, float azimuth, int radius) Creates a new emboss effect with given altitude, azimuth and radius.
-
-
Method Details
-
getAltitude
public float getAltitude()Returns altitude of light source. -
getAzimuth
public float getAzimuth()Returns angle of light source. -
getRadius
public int getRadius()Returns radius of edge rounding. -
deriveEffect
Derive with new altitude and azimuth. -
deriveEffect
Derive with new radius. -
getImage
Creates effect image- Specified by:
getImage
in classRMImageEffect
-
emboss
Emboss a 24 bit source image according to a bump map. Bump map is assumed to to be (2*_radius x 2*_radius) pixels larger than the source to compensate for edge conditions of both the blur and the emboss convolutions. -
isolateHeightSample
public void isolateHeightSample(int[] bumpPixels, int w, int h) Converts the argb bumpSamples into an array of signed ints representing the height. Height values should be in the range 0-255 -
paint
Render this fill in a shape painter. -
equals
Standard equals implementation. -
toXML
XML archival.- Specified by:
toXML
in interfaceArchivable
- Overrides:
toXML
in classRMEffect
-
fromXML
XML unarchival.- Specified by:
fromXML
in interfaceArchivable
- Overrides:
fromXML
in classRMEffect
-