Changeset View
Changeset View
Standalone View
Standalone View
plugins/filters/blur/kis_gaussian_blur_filter.cpp
Show First 20 Lines • Show All 95 Lines • ▼ Show 20 Line(s) | |||||
96 | } | 96 | } | ||
97 | 97 | | |||
98 | QRect KisGaussianBlurFilter::neededRect(const QRect & rect, const KisFilterConfigurationSP _config, int lod) const | 98 | QRect KisGaussianBlurFilter::neededRect(const QRect & rect, const KisFilterConfigurationSP _config, int lod) const | ||
99 | { | 99 | { | ||
100 | KisLodTransformScalar t(lod); | 100 | KisLodTransformScalar t(lod); | ||
101 | 101 | | |||
102 | QVariant value; | 102 | QVariant value; | ||
103 | /** | 103 | /** | ||
104 | * NOTE: integer devision by two is done on purpose, | 104 | * NOTE: integer division by two is done on purpose, | ||
105 | * because the kernel size is always odd | 105 | * because the kernel size is always odd | ||
106 | */ | 106 | */ | ||
107 | const int halfWidth = _config->getProperty("horizRadius", value) ? KisGaussianKernel::kernelSizeFromRadius(t.scale(value.toFloat())) / 2 : 5; | 107 | const int halfWidth = _config->getProperty("horizRadius", value) ? KisGaussianKernel::kernelSizeFromRadius(t.scale(value.toFloat())) / 2 : 5; | ||
108 | const int halfHeight = _config->getProperty("vertRadius", value) ? KisGaussianKernel::kernelSizeFromRadius(t.scale(value.toFloat())) / 2 : 5; | 108 | const int halfHeight = _config->getProperty("vertRadius", value) ? KisGaussianKernel::kernelSizeFromRadius(t.scale(value.toFloat())) / 2 : 5; | ||
109 | 109 | | |||
110 | return rect.adjusted(-halfWidth * 2, -halfHeight * 2, halfWidth * 2, halfHeight * 2); | 110 | return rect.adjusted(-halfWidth * 2, -halfHeight * 2, halfWidth * 2, halfHeight * 2); | ||
111 | } | 111 | } | ||
112 | 112 | | |||
Show All 11 Lines |