1 #ifndef color_hsl_convert_cmyk 2 #define color_hsl_convert_cmyk 3 4 #include "../../_internal/convert.hpp" 5 6 #include "../category.hpp" 7 8 9 #include "../../cmyk/cmyk.hpp" 10 #include "../../rgb/rgb.hpp" 11 12 namespace color 13 { 14 namespace _internal 15 { 16 17 template< typename hsl_tag_name, typename cmyk_tag_name > 18 struct convert 19 < 20 ::color::category::hsl< hsl_tag_name > 21 ,::color::category::cmyk< cmyk_tag_name > 22 > 23 { 24 public: 25 typedef ::color::category::hsl< hsl_tag_name > hsl_category_type, category_left_type; 26 typedef ::color::category::cmyk< cmyk_tag_name > cmyk_category_type, category_right_type; 27 28 typedef typename ::color::trait::scalar< category_left_type >::instance_type scalar_type; 29 30 typedef ::color::model< hsl_category_type > hsl_model_type; 31 typedef ::color::model< cmyk_category_type > cmyk_model_type; 32 33 typedef ::color::rgb< scalar_type > rgb_model_type; 34 35 typedef ::color::trait::container<category_left_type> container_left_trait_type; 36 typedef ::color::trait::container<category_right_type> container_right_trait_type; 37 38 typedef typename container_left_trait_type::input_type container_left_input_type; 39 typedef typename container_right_trait_type::model_type container_right_const_input_type; 40 processcolor::_internal::convert41 static void process 42 ( 43 container_left_input_type left 44 ,container_right_const_input_type right 45 ) 46 { 47 left = hsl_model_type( rgb_model_type( cmyk_model_type( right ) ) ).container(); 48 } 49 }; 50 51 } 52 } 53 54 #endif 55