Apply rectangular blur
xblur | Specifies the range of horizontal blur. |
yblur | Specifies the range of vertical blur. |
Blur.
The algorithm is "box blur".
A rectangular blur is the average of the brightness of pixels in a "range" represented by two parameters, xblur and yblur.
For example, if xblur = 10 yblur = 2, the brightness of the pixels in the rectangular range of -10 to 10 in the horizontal direction and -2 to 2 in the vertical direction is averaged around the target pixel, and that is the final result. It is the brightness of that pixel.
The area of the range can be calculated by (xblur × 2 + 1) × (yblur × 2 + 1).
In the current version, if this area is less than 256, the algorithm is faster than if the area is 256 or more.
If the Layer.face property is dfAlpha, it will be a bit slower as it uses a special algorithm for alpha compositing.
For dfAddAlpha and other drawing methods, the algorithm is faster.