Commit cd04f424 authored by Noah Davis's avatar Noah Davis 🌵

Multiply radius by 0.5 in calculateBlurStdDev()

Summary: Fix TODO to follow w3.org standard for shadow-blur

Reviewers: #breeze, ngraham

Reviewed By: #breeze, ngraham

Subscribers: ngraham, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D19134
parent 3e78fa28
......@@ -45,13 +45,7 @@ static inline int calculateBlurRadius(qreal stdDev)
static inline qreal calculateBlurStdDev(int radius)
{
// https://www.w3.org/TR/css-backgrounds-3/#shadow-blur says that the resulting
// shadow must approximate the image that would be generated by applying to the
// shadow a Gaussian blur with a standard deviation equal to half the blur radius,
// but we had been using a slightly different (non-standard compliant) routine to
// derive the standard deviation before, so in order to not break existing shadow
// params, we're not following the standard.
return radius * 0.43; // TODO: Multiply by 0.5 instead.
return radius * 0.5;
}
static inline QSize calculateBlurExtent(int radius)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment