00001 /*00002 Copyright 2005-2007 Adobe Systems Incorporated00003 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 at00006 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 #ifndef GIL_RGBA_H00013 #define GIL_RGBA_H00014
00022
00023 #include <cstddef>00024 #include "gil_config.hpp"00025 #include <boost/mpl/contains.hpp>00026 #include "rgb.hpp"00027 #include "planar_pixel_iterator.hpp"00028
00029 namespace boost { namespace gil {
00030
00033struct alpha_t {};
00034
00036 typedef mpl::vector4<red_t,green_t,blue_t,alpha_t> rgba_t;
00037
00039 typedeflayout<rgba_t>rgba_layout_t;
00041 typedeflayout<rgba_t, mpl::vector4_c<int,2,1,0,3> > bgra_layout_t;
00043 typedeflayout<rgba_t, mpl::vector4_c<int,1,2,3,0> > argb_layout_t;
00045 typedeflayout<rgba_t, mpl::vector4_c<int,3,2,1,0> > abgr_layout_t;
00046
00049 template <typename IC>
00050 inline00051 typenametype_from_x_iterator<planar_pixel_iterator<IC,rgba_t> >::view_t
00052planar_rgba_view(std::size_t width, std::size_t height,
00053 IC r, IC g, IC b, IC a,
00054 std::ptrdiff_t rowsize_in_bytes) {
00055 typedeftypenametype_from_x_iterator<planar_pixel_iterator<IC,rgba_t> >::view_t RView;
00056 return RView(width, height,
00057 typename RView::locator(planar_pixel_iterator<IC,rgba_t>(r,g,b,a),
00058 rowsize_in_bytes));
00059 }
00060
00061 } } // namespace boost::gil00062
00063 #endif
Generated on Sat May 2 13:50:15 2009 for Generic Image Library by
1.5.6
Статья Generic Image Library: rgba.hpp Source File раздела может быть полезна для разработчиков на c++ и boost.
Материалы статей собраны из открытых источников, владелец сайта не претендует на авторство. Там где авторство установить не удалось, материал подаётся без имени автора. В случае если Вы считаете, что Ваши права нарушены, пожалуйста, свяжитесь с владельцем сайта.