PictureEffects Xojo and Real Studio Plugin |
|
MotionBlur Method
To do a motion blur effect on a picture then use the MotionBlur function.
MotionBlur(
src as Picture,
repetitions as Integer,
angle as Double,
distance as Integer,
blurType as Integer,
mask as Picture,
progress as IProgressHandler) as Picture
Parameters
- src
- The source picture to work with. This picture has to be 24 or 32 bits per pixel.
- repetitions
- The number of passes that the MotionBlur filter does.
- angle
- The angle in degrees of the motion. This parameter is ignored in Radial and zoom modes.
- distance
- The distance between motion frames. When in Radial mode then odd numbers are internally scaled down to the next even number.
- blurType
- A type constant which determines what type of motion blur should be performed. Possible values are: 0 - Linear, 1 - Radial, 2 - Zoom.
- mask
- To limit the filtering to certain pixels then set a picture defining the mask to this parameter. Pass nil to this parameter if the filtering should not be limited to certain pixels.
The mask picture must be a 32 bit picture and must be same size as the src picture. If the mask picture is not 32 bits and same size as the src picture then the function will fail and leave the result picture unchanged. - progress
- Use this parameter to use a progress class to get progress feedback from this function. This class must be a class that Implements the IProgressHandler Interface which is defined in this plugin.
Pass nil to this parameter if you don't need progress feedback.
Progress feedback will slow the filter down.
Returns
- Picture
- If the filter was successful: A reference to the modified picture.
If the src picture was not 24 or 32 bits then a nil will be returned. Nil is also returned if a invalid mask was passed to the function.
This filter will allocate memory so a Nil is also returned if not enough memory could be allocated for it.
Remarks
Supported Platforms:
MacOS X CarbonMacOS X CocoaWin32 - WindowsLinux x86Unsupported Platforms:
MacOS X Carbon
See Also
GlobalMethods Global