Changeset View
Changeset View
Standalone View
Standalone View
plugins/filters/edgedetection/kis_edge_detection_filter.cpp
Show First 20 Lines • Show All 129 Lines • ▼ Show 20 Line(s) | |||||
130 | } | 130 | } | ||
131 | 131 | | |||
132 | QRect KisEdgeDetectionFilter::neededRect(const QRect &rect, const KisFilterConfigurationSP _config, int lod) const | 132 | QRect KisEdgeDetectionFilter::neededRect(const QRect &rect, const KisFilterConfigurationSP _config, int lod) const | ||
133 | { | 133 | { | ||
134 | KisLodTransformScalar t(lod); | 134 | KisLodTransformScalar t(lod); | ||
135 | 135 | | |||
136 | QVariant value; | 136 | QVariant value; | ||
137 | /** | 137 | /** | ||
138 | * NOTE: integer devision by two is done on purpose, | 138 | * NOTE: integer division by two is done on purpose, | ||
139 | * because the kernel size is always odd | 139 | * because the kernel size is always odd | ||
140 | */ | 140 | */ | ||
141 | const int halfWidth = _config->getProperty("horizRadius", value) ? KisEdgeDetectionKernel::kernelSizeFromRadius(t.scale(value.toFloat())) / 2 : 5; | 141 | const int halfWidth = _config->getProperty("horizRadius", value) ? KisEdgeDetectionKernel::kernelSizeFromRadius(t.scale(value.toFloat())) / 2 : 5; | ||
142 | const int halfHeight = _config->getProperty("vertRadius", value) ? KisEdgeDetectionKernel::kernelSizeFromRadius(t.scale(value.toFloat())) / 2 : 5; | 142 | const int halfHeight = _config->getProperty("vertRadius", value) ? KisEdgeDetectionKernel::kernelSizeFromRadius(t.scale(value.toFloat())) / 2 : 5; | ||
143 | 143 | | |||
144 | return rect.adjusted(-halfWidth * 2, -halfHeight * 2, halfWidth * 2, halfHeight * 2); | 144 | return rect.adjusted(-halfWidth * 2, -halfHeight * 2, halfWidth * 2, halfHeight * 2); | ||
145 | } | 145 | } | ||
146 | 146 | | |||
Show All 13 Lines |