PictureEffectsConsole Xojo Plugin |
|
BlendEffectConsole.Apply Method (console only)
Applies the effect on a given 32 bit source image with a given 32 bit mask and returns the result to a new image.
Apply(
source as Picture,
fillPicture as Picture,
opacity as Double,
fillMask as Picture,
location as Point,
size as Point) as Picture
Parameters
- source
- The source picture to work with (can be 24 or 32 bits).
- fillPicture
- The picture to draw onto the src picture. This picture does not need to be the same size as the src picture. But it needs to follow other rules that this plugin sets such as it must be a clean 32 bit picture.
- opacity
- This parameter defines the opacity value of the fillPicture. This value can be from 0.01 to 1.0. If you use the value 1.0 then you are no longer in blending mode and are only drawing the fillPicture onto the src picture with the given mask.
- fillMask
- 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 must be at least as big as the src picture or as big as the size parameter if the size parameter is used.
The mask can only be a 32 bit picture. If the mask is a 32 bit picture then it can be either black and white or grayscale. If passing a color image as the mask then the Red channel will rule as a Grayscale image for the mask.
If the mask picture has unsupported depth or is smaller than it may be then the src picture and the return value will be left unmodified. - location
- Use this parameter to define where on the src picture the fillPicture should be drawn. You may pass nil to this parameter. If nil is passed to this parameter then the picture will be drawn at location (0,0).
- size
- Use this parameter to limit the size of the fillPicture. If the values passed in this parameter are bigger than the fillPicture or smaller than zero then this parameter will be ignored.
You may pass nil to this parameter. Passing nil to this parameter will make it default to the size of the fillPicture.
Returns
- Picture
- The result image or nil if failure.
Remarks
See Also
BlendEffectConsole Class