1 #ifndef color_YCgCo_convert_cmyk 2 #define color_YCgCo_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 13 14 15 16 17 18 namespace color 19 { 20 namespace _internal 21 { 22 23 template 24 < 25 typename YCgCo_tag_name 26 ,typename cmyk_tag_name 27 > 28 struct convert 29 < 30 ::color::category::YCgCo< YCgCo_tag_name > 31 ,::color::category::cmyk< cmyk_tag_name > 32 > 33 { 34 public: 35 typedef ::color::category::YCgCo< YCgCo_tag_name > YCgCo_category_type, category_left_type; 36 typedef ::color::category::cmyk< cmyk_tag_name > cmyk_category_type, category_right_type; 37 38 typedef typename ::color::trait::scalar< YCgCo_category_type >::instance_type scalar_type; 39 40 typedef ::color::model< YCgCo_category_type > YCgCo_model_type; 41 typedef ::color::model< cmyk_category_type > cmyk_model_type; 42 43 typedef ::color::rgb< scalar_type > rgb_model_type; 44 45 46 typedef ::color::trait::container<category_left_type> container_left_trait_type; 47 typedef ::color::trait::container<category_right_type> container_right_trait_type; 48 49 typedef typename container_left_trait_type::input_type container_left_input_type; 50 typedef typename container_right_trait_type::model_type container_right_const_input_type; 51 processcolor::_internal::convert52 static void process 53 ( 54 container_left_input_type left 55 ,container_right_const_input_type right 56 ) 57 { 58 left = YCgCo_model_type( rgb_model_type( cmyk_model_type( right ) ) ).container(); 59 } 60 }; 61 62 } 63 } 64 65 #endif 66