Layer.doBoxBlur

Function/Meaning
Apply box blur
Type
Method of Layer class
Syntax
doBoxBlur(xblur=1, yblur=1)
Arguments
xblur Specifies the horizontal blur range.
yblur Specifies the vertical blur range.
Return Value
None (void)
Description
Applies a blur effect. The algorithm used is "box blur".
Box blur calculates the average luminance of pixels within a "range" defined by the two parameters xblur and yblur. For example, if xblur=10 and yblur=2, it takes the average luminance of pixels in a rectangular range from -10 to 10 horizontally and -2 to 2 vertically, centered on the target pixel, and sets that as the final luminance for that pixel.
The area of the range can be calculated as (xblur*2+1) * (yblur*2+1). In the current version, if this area is less than 256, a faster algorithm is used compared to when the area is 256 or more.
If the Layer.face property is dfAlpha, a special algorithm for alpha blending is used, which is slightly slower. For dfAddAlpha or other drawing modes, a faster algorithm is used.