40struct planar_pixel_reference : detail::homogeneous_color_base
44 mp11::mp_size<ColorSpace>::value
47 using parent_t =detail::homogeneous_color_base
51 mp11::mp_size<ColorSpace>::value
56 using channel_t =
typename channel_traits<ChannelReference>::value_type;
57 using channel_const_reference =
typename channel_traits<ChannelReference>::const_reference;
60 static constexpr bool is_mutable = channel_traits<ChannelReference>::is_mutable;
62 using reference = planar_pixel_reference<ChannelReference, ColorSpace>;
63 using const_reference = planar_pixel_reference<channel_const_reference,ColorSpace>;
65 planar_pixel_reference(ChannelReference v0, ChannelReference v1)
69 planar_pixel_reference(ChannelReference v0, ChannelReference v1, ChannelReference v2)
70 : parent_t(v0, v1, v2)
73 planar_pixel_reference(ChannelReference v0, ChannelReference v1, ChannelReference v2, ChannelReference v3)
74 : parent_t(v0, v1, v2, v3)
77 planar_pixel_reference(ChannelReference v0, ChannelReference v1, ChannelReference v2, ChannelReference v3, ChannelReference v4)
78 : parent_t(v0, v1, v2, v3, v4)
81 planar_pixel_reference(ChannelReference v0, ChannelReference v1, ChannelReference v2, ChannelReference v3, ChannelReference v4, ChannelReference v5)
82 : parent_t(v0, v1, v2, v3, v4, v5)
85 planar_pixel_reference(planar_pixel_reference
const& p) : parent_t(p) {}
88 auto operator=(planar_pixel_reference
const& p)
const -> planar_pixel_reference
const&
90 static_copy(p, *
this);
94 template <
typename Pixel>
95 planar_pixel_reference(Pixel
const& p) : parent_t(p)
97 check_compatible<Pixel>();
101 template <
typename Pixel>
102 auto operator=(Pixel
const& p)
const -> planar_pixel_reference
const&
104 check_compatible<Pixel>();
105 static_copy(p, *
this);
110 template <
typename ChannelV,
typename Mapping>
114 check_compatible<pixel<ChannelV, layout<ColorSpace, Mapping>>>();
118 template <
typename ChannelPtr>
130#if BOOST_WORKAROUND(__HP_aCC, >= 61700) || BOOST_WORKAROUND(__INTEL_COMPILER, >= 1000)
131 const planar_pixel_reference& operator=(
const planar_pixel_reference& p) { static_copy(p,*
this);
return *
this; }
132 template <
typename P>
const planar_pixel_reference& operator=(
const P& p) { check_compatible<P>(); static_copy(p,*
this);
return *
this; }
135 template <
typename Pixel>
136 bool operator==(Pixel
const& p)
const
138 check_compatible<Pixel>();
139 return static_equal(*
this, p);
142 template <
typename Pixel>
143 bool operator!=(Pixel
const &p)
const {
return !(*
this == p); }
145 auto operator[](std::size_t i)
const -> ChannelReference {
return this->at_c_dynamic(i); }
146 auto operator->()
const -> planar_pixel_reference
const* {
return this; }
149 template <
typename Pixel>
150 static void check_compatible()
152 gil_function_requires<PixelsCompatibleConcept<Pixel, planar_pixel_reference>>();