|
Generic Image Library: rgba.hpp Source FileBoost , ,
rgba.hppGo to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef GIL_RGBA_H
00013 #define GIL_RGBA_H
00014
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
00033 struct alpha_t {};
00034
00036 typedef mpl::vector4<red_t,green_t,blue_t,alpha_t> rgba_t;
00037
00039 typedef layout<rgba_t> rgba_layout_t;
00041 typedef layout<rgba_t, mpl::vector4_c<int,2,1,0,3> > bgra_layout_t;
00043 typedef layout<rgba_t, mpl::vector4_c<int,1,2,3,0> > argb_layout_t;
00045 typedef layout<rgba_t, mpl::vector4_c<int,3,2,1,0> > abgr_layout_t;
00046
00049 template <typename IC>
00050 inline
00051 typename type_from_x_iterator<planar_pixel_iterator<IC,rgba_t> >::view_t
00052 planar_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 typedef typename type_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 } }
00062
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.
:: Главная :: ::
|
|
|
|
|