Modules | Alphabetical List | Class List | Directories | File List | GIL Home Page # cmyk.hpp Go to the documentation of this file.
    00001 /*
    00002     Copyright 2005-2007 Adobe Systems Incorporated
    00003
    00004     Use, modification and distribution are subject to the Boost Software License,
    00005     Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
    00006     http://www.boost.org/LICENSE_1_0.txt).
    00007
    00008     See http://opensource.adobe.com/gil for most recent version including documentation.
    00009 */
    00010
    00011 /*************************************************************************************************/
    00012
    00013 #ifndef GIL_CMYK_H
    00014 #define GIL_CMYK_H
    00015
    00023
    00024 #include <cstddef>
    00025 #include "gil_config.hpp"
    00026 #include "metafunctions.hpp"
    00027 #include <boost/mpl/range_c.hpp>
    00028 #include <boost/mpl/vector_c.hpp>
    00029
    00030 namespace boost { namespace gil {
    00031
    00032
    00035
    00037 struct cyan_t {};
    00038
    00040 struct magenta_t {};
    00041
    00043 struct yellow_t {};
    00044
    00046 struct black_t {};
    00048
    00050 typedef mpl::vector4<cyan_t,magenta_t,yellow_t,black_t>  cmyk_t;
    00051
    00053 typedef layout<cmyk_t> cmyk_layout_t;
    00054
    00057 template <typename IC>
    00058 inline typename type_from_x_iterator<planar_pixel_iterator<IC,cmyk_t> >::view_t
    00059 planar_cmyk_view(std::size_t width, std::size_t height, IC c, IC m, IC y, IC k, std::ptrdiff_t rowsize_in_bytes) {
    00060     typedef typename type_from_x_iterator<planar_pixel_iterator<IC,cmyk_t> >::view_t RView;
    00061     return RView(width, height, typename RView::locator(planar_pixel_iterator<IC,cmyk_t>(c,m,y,k), rowsize_in_bytes));
    00062 }
    00063
    00064 } }  // namespace gil
    00065
    00066 #endif