This method produces a ripple like effect on a raster image.
Public Function Ripple(amplitude As Double, waveLength As Double, phase As Double, backColor As Boolean, reflect As Boolean, red As Byte, green As Byte, blue As Byte) As Boolean
public bool Ripple(double amplitude, double waveLength, double phase, bool backColor, bool reflect, byte red, byte green, byte blue);
Parameters
amplitude
Sets the amplitude or height of the
ripples. As this value increases the ripples become higher
waveLength
Sets the wavelength or distance from
the crest of one wave to the crest of the next wave. As this value
increases there are few ripples produced
phase
Sets the phase or shift in the wave
cycle
backColor
Sets whether empty spaces are filled
with color from adjacent pixels or from the color set as a
background color [False: spaces filled with background color,
True:spaces filled with the color of the adjacent pixels]
reflect
Causes a reflective effect from one
ripple to the next (Best used with small amplitudes) [False:No
reflection, True: reflection]
red
The red component of the background
color (from 0 to 255)
green
The green component of the background
color (from 0 to 255)
blue
The blue component of the background
color (from 0 to 255)
Return Value
Returns True if successful. Returns False if unsuccessful.
Explanation
The Ripple method produces a ripple like effect on a raster image.
To execute the Ripple method, set the image handle of the image in the SourceImage property. The Ripple method supports 8 bit grayscale, 16, 24, and 32 bit images.
Before executing the Ripple method, you must set the area on the image that will be affected. There are 4 ways to do this.
- To use a mask image, set the SelectMode property to EffectMask. Set the mask image handle in the SourceMask property
- To process the total image, set the SelectMode property to EffectAll
- To process the polygonal area on the image, set the SelectMode property to EffectPolygon. Select the polygon by setting the appropriate coordinate values for the points of the polygon in the Point property
- To process an elliptical area on the image, set the SelectMode property to EffectEllipse. Select the ellipse by setting the appropriate values for the bounding rectangle in the Rect property
When the SelectMode property is set to EffectPolygon or EffectEllipse, the appropriate values must be set in the Inside property.
If successful the resulting raster image data is set in the DestinationImage property.