convertRadiusToSigma static method
- double radius
Converts a blur radius in pixels to sigmas.
See the sigma argument to MaskFilter.blur.
Implementation
// See SkBlurMask::ConvertRadiusToSigma().
// <https://github.com/google/skia/blob/bb5b77db51d2e149ee66db284903572a5aac09be/src/effects/SkBlurMask.cpp#L23>
static double convertRadiusToSigma(double radius) {
return radius > 0 ? radius * 0.57735 + 0.5 : 0;
}