diff --git a/deps/agg/src/agg_pixfmt_rgba.cpp b/deps/agg/src/agg_pixfmt_rgba.cpp index c19e9d60e..0fa18b230 100644 --- a/deps/agg/src/agg_pixfmt_rgba.cpp +++ b/deps/agg/src/agg_pixfmt_rgba.cpp @@ -1,9 +1,13 @@ - #include "agg_pixfmt_rgba.h" #pragma GCC diagnostic push #include +#include +#if BOOST_VERSION >= 106900 +#include +#else #include +#endif #include #include #pragma GCC diagnostic pop diff --git a/deps/boost/gil/extension/toolbox/hsl.hpp b/deps/boost/gil/extension/toolbox/hsl.hpp index b1b9c1bf5..620ae78ed 100644 --- a/deps/boost/gil/extension/toolbox/hsl.hpp +++ b/deps/boost/gil/extension/toolbox/hsl.hpp @@ -16,7 +16,12 @@ #pragma GCC diagnostic push #include +#if BOOST_VERSION >= 106900 +#include +#else #include +#endif + #pragma GCC diagnostic pop namespace boost { namespace gil { @@ -26,11 +31,11 @@ namespace boost { namespace gil { namespace hsl_color_space { /// \brief Hue -struct hue_t {}; +struct hue_t {}; /// \brief Saturation struct saturation_t {}; /// \brief Lightness -struct lightness_t {}; +struct lightness_t {}; } /// \} @@ -98,12 +103,12 @@ struct default_color_converter_impl< rgb_t, hsl_t > if( lightness < 0.5f ) { - saturation = diff + saturation = diff / ( min_color + max_color ); } else { - saturation = ( max_color - min_color ) + saturation = ( max_color - min_color ) / ( 2.f - diff ); } @@ -112,7 +117,7 @@ struct default_color_converter_impl< rgb_t, hsl_t > if( std::abs( max_color - temp_red ) < 0.0001f ) { // max_color is red - hue = ( temp_green - temp_blue ) + hue = ( temp_green - temp_blue ) / diff; } @@ -120,8 +125,8 @@ struct default_color_converter_impl< rgb_t, hsl_t > { // max_color is green // 2.0 + (b - r) / (maxColor - minColor) - hue = 2.f - + ( temp_blue - temp_red ) + hue = 2.f + + ( temp_blue - temp_red ) / diff; } @@ -129,13 +134,13 @@ struct default_color_converter_impl< rgb_t, hsl_t > { // max_color is blue // 4.0 + (r - g) / (maxColor - minColor) - hue = 4.f - + ( temp_red - temp_green ) + hue = 4.f + + ( temp_red - temp_green ) / diff; } hue /= 6.f; - + if( hue < 0.f ) { hue += 1.f; @@ -173,29 +178,29 @@ struct default_color_converter_impl float tempr, tempg, tempb; //Set the temporary values - if( get_color( src, lightness_t() ) < 0.5 ) + if( get_color( src, lightness_t() ) < 0.5 ) { temp2 = get_color( src, lightness_t() ) * ( 1.f + get_color( src, saturation_t() ) ); } else { - temp2 = ( get_color( src, lightness_t() ) + get_color( src, saturation_t() )) + temp2 = ( get_color( src, lightness_t() ) + get_color( src, saturation_t() )) - ( get_color( src, lightness_t() ) * get_color( src, saturation_t() )); } temp1 = 2.f - * get_color( src, lightness_t() ) + * get_color( src, lightness_t() ) - temp2; - tempr = get_color( src, hue_t() ) + 1.f / 3.f; + tempr = get_color( src, hue_t() ) + 1.f / 3.f; if( tempr > 1.f ) { tempr--; } - tempg = get_color( src, hue_t() ); + tempg = get_color( src, hue_t() ); tempb = get_color( src, hue_t() ) - 1.f / 3.f; if( tempb < 0.f ) @@ -203,7 +208,7 @@ struct default_color_converter_impl tempb++; } - //Red + //Red if( tempr < 1.f / 6.f ) { red = temp1 + ( temp2 - temp1 ) * 6.f * tempr; @@ -214,7 +219,7 @@ struct default_color_converter_impl } else if( tempr < 2.f / 3.f ) { - red = temp1 + (temp2 - temp1) + red = temp1 + (temp2 - temp1) * (( 2.f / 3.f ) - tempr) * 6.f; } else @@ -222,7 +227,7 @@ struct default_color_converter_impl red = temp1; } - //Green + //Green if( tempg < 1.f / 6.f ) { green = temp1 + ( temp2 - temp1 ) * 6.f * tempg; @@ -241,7 +246,7 @@ struct default_color_converter_impl green = temp1; } - //Blue + //Blue if( tempb < 1.f / 6.f ) { blue = temp1 + (temp2 - temp1) * 6.f * tempb; @@ -252,7 +257,7 @@ struct default_color_converter_impl } else if( tempb < 2.f / 3.f ) { - blue = temp1 + (temp2 - temp1) + blue = temp1 + (temp2 - temp1) * (( 2.f / 3.f ) - tempb) * 6.f; } else diff --git a/deps/boost/gil/extension/toolbox/hsv.hpp b/deps/boost/gil/extension/toolbox/hsv.hpp index dc6e14e24..90ca8cbc0 100644 --- a/deps/boost/gil/extension/toolbox/hsv.hpp +++ b/deps/boost/gil/extension/toolbox/hsv.hpp @@ -16,7 +16,12 @@ #pragma GCC diagnostic push #include +#if BOOST_VERSION >= 106900 +#include +#else #include +#endif + #pragma GCC diagnostic pop namespace boost { namespace gil { @@ -26,11 +31,11 @@ namespace boost { namespace gil { namespace hsv_color_space { /// \brief Hue -struct hue_t {}; +struct hue_t {}; /// \brief Saturation struct saturation_t{}; /// \brief Value -struct value_t {}; +struct value_t {}; } /// \} @@ -80,11 +85,11 @@ struct default_color_converter_impl< rgb_t, hsv_t > bits32f diff = max_color - min_color; if( max_color < 0.0001f ) - { + { saturation = 0.f; } - else - { + else + { saturation = diff / max_color; } @@ -92,10 +97,10 @@ struct default_color_converter_impl< rgb_t, hsv_t > if( saturation < 0.0001f ) { //it doesn't matter what value it has - hue = 0.f; - } + hue = 0.f; + } else - { + { if( temp_red == max_color ) { hue = ( temp_green - temp_blue ) @@ -103,17 +108,17 @@ struct default_color_converter_impl< rgb_t, hsv_t > } else if( temp_green == max_color ) { - hue = 2.f + ( temp_blue - temp_red ) + hue = 2.f + ( temp_blue - temp_red ) / diff; } else { - hue = 4.f + ( temp_red - temp_green ) + hue = 4.f + ( temp_red - temp_green ) / diff; } //to bring it to a number between 0 and 1 - hue /= 6.f; + hue /= 6.f; if( hue < 0.f ) { @@ -161,7 +166,7 @@ struct default_color_converter_impl frac = h - i; // p = value * (1 - saturation) - p = get_color( src, value_t() ) + p = get_color( src, value_t() ) * ( 1.f - get_color( src, saturation_t() )); // q = value * (1 - saturation * hue_frac) @@ -171,11 +176,11 @@ struct default_color_converter_impl // t = value * (1 - (saturation * (1 - hue_frac)) // it grows with increasing distance from floor(hue) - t = get_color( src, value_t() ) + t = get_color( src, value_t() ) * ( 1.f - ( get_color( src, saturation_t() ) * ( 1.f - frac ))); switch( i % 6 ) - { + { case 0: // red to yellow { red = get_color( src, value_t() ); @@ -224,7 +229,7 @@ struct default_color_converter_impl case 5: // magenta to red { red = get_color( src, value_t() ); - green = p; + green = p; blue = q; break; diff --git a/include/mapnik/image_filter.hpp b/include/mapnik/image_filter.hpp index 4aa1e8c7d..189b29e34 100644 --- a/include/mapnik/image_filter.hpp +++ b/include/mapnik/image_filter.hpp @@ -31,7 +31,11 @@ #pragma GCC diagnostic push #include +#if BOOST_VERSION >= 106900 +#include +#else #include +#endif #pragma GCC diagnostic pop #pragma GCC diagnostic push