This method creates a wave like effect on a raster image.
Parameters
direction
Sets the direction of the waves (0: horizontal,
1: vertical)
type
Sets the type of wave (0:sin wave, 1:
sawtooth)
period
Sets the length of the wave (more than 0)
amplitude
Sets the size of the wave (more than 0)
phase
Sets the phase or shift in the wave cycle.(from
0.0 to 1.0)
edge
Sets the type of edge(0: background color,
1:adjoining pixel color, 2 wrap around)
red
Sets the red component of the background color
(from 0 to 255)
green
Sets the green component of the background color
(from 0 to 255)
blue
Sets the blue component of the background color
(from 0 to 255)
Return Value
Returns True if successful. Returns False if unsuccessful.
Explanation
The Waves method creates a wave like effect on a raster image.
To execute the Waves method, set the image handle of the image in the Image property or the Layer(LayerNumber).Image property. The Waves method supports 8 bit grayscale, 16, 24, and 32 bit images.
Before executing the Waves 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. When a 1, 4, or 8 bit image is processed, the total image will be processed regardless of the value set in the SelectMode property.
If the Waves method is successful and the DestinationAsImageKitImage property is True, the resulting image will be set in the Image property or in the Layer(LayerNumber).Image property, according to the value set in the LayerNumber property.
If the Waves method is successful and the DestinationAsImageKitImage property is False, the resulting image will be set in the DestinationImage property.