index 85faadebcd86018873e67e6467735c6e274ab5ea..e9e422094fc1ca1d17e25d4e6096e62f43cd41d9 100644 (file)
#include "nr-filter-utils.h"
-namespace NR {
+namespace Inkscape {
+namespace Filters {
-int clamp(int val) {
+int clamp(int const val) {
if (val < 0) return 0;
if (val > 255) return 255;
return val;
}
-
-} //namespace NR
+
+int clamp3(int const val) {
+ if (val < 0) return 0;
+ if (val > 16581375) return 16581375;
+ return val;
+}
+
+int clamp_alpha(int const val, int const alpha) {
+ if (val < 0) return 0;
+ if (val > alpha) return alpha;
+ return val;
+}
+
+} /* namespace Filters */
+} /* namespace Inkscape */
+
+/*
+ Local Variables:
+ mode:c++
+ c-file-style:"stroustrup"
+ c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
+ indent-tabs-mode:nil
+ fill-column:99
+ End:
+*/
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :