Skip to content

Commit

Permalink
Update pixel design documentation for MP11 changes (#626)
Browse files Browse the repository at this point in the history
Update documentation after #274.
  • Loading branch information
OmarEmaraDev committed Oct 4, 2021
1 parent 7dd6120 commit 3279523
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions doc/design/pixel.rst
Expand Up @@ -183,13 +183,13 @@ such packed pixel formats:
.. code-block:: cpp
// define an rgb565 pixel
typedef packed_pixel_type<uint16_t, mpl::vector3_c<unsigned,5,6,5>, rgb_layout_t>::type rgb565_pixel_t;
typedef packed_pixel_type<uint16_t, mp11::mp_list_c<unsigned,5,6,5>, rgb_layout_t>::type rgb565_pixel_t;
function_requires<PixelValueConcept<rgb565_pixel_t> >();
static_assert(sizeof(rgb565_pixel_t) == 2, "");
// define a bgr556 pixel
typedef packed_pixel_type<uint16_t, mpl::vector3_c<unsigned,5,6,5>, bgr_layout_t>::type bgr556_pixel_t;
typedef packed_pixel_type<uint16_t, mp11::mp_list_c<unsigned,5,6,5>, bgr_layout_t>::type bgr556_pixel_t;
function_requires<PixelValueConcept<bgr556_pixel_t> >();
Expand All @@ -211,7 +211,7 @@ pixels and pixel iterators:
.. code-block:: cpp
// Mutable reference to a BGR232 pixel
typedef const bit_aligned_pixel_reference<unsigned char, mpl::vector3_c<unsigned,2,3,2>, bgr_layout_t, true> bgr232_ref_t;
typedef const bit_aligned_pixel_reference<unsigned char, mp11::mp_list_c<unsigned,2,3,2>, bgr_layout_t, true> bgr232_ref_t;
// A mutable iterator over BGR232 pixels
typedef bit_aligned_pixel_iterator<bgr232_ref_t> bgr232_ptr_t;
Expand Down Expand Up @@ -255,7 +255,7 @@ algorithms and metafunctions of color bases can work with them as well:
BOOST_MPL_ASSERT(num_channels<rgb8_pixel_t>::value == 3);
BOOST_MPL_ASSERT((is_same<channel_type<rgb8_pixel_t>::type, bits8>));
BOOST_MPL_ASSERT((is_same<color_space_type<bgr8_pixel_t>::type, rgb_t> ));
BOOST_MPL_ASSERT((is_same<channel_mapping_type<bgr8_pixel_t>::type, mpl::vector3_c<int,2,1,0> > ));
BOOST_MPL_ASSERT((is_same<channel_mapping_type<bgr8_pixel_t>::type, mp11::mp_list_c<int,2,1,0> > ));
// Pixels contain just the three channels and nothing extra
BOOST_MPL_ASSERT(sizeof(rgb8_pixel_t)==3);
Expand Down

0 comments on commit 3279523

Please sign in to comment.