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
wilder-5.17
Noah Davis 7 years ago
parent 3e78fa2858
commit cd04f42432
  1. 8
      libbreezecommon/breezeboxshadowrenderer.cpp

@ -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)

Loading…
Cancel
Save