Visual Computing Library
All Classes Functions Variables Typedefs Enumerations Friends Modules Pages Concepts
vcl::ColorConcept Concept Reference

ColorConcept is satisfied only if a class provides the member functions specified in this concept. These member functions allows to access to the color components of a given color. More...

#include <vclib/concepts/space/color.h>

Concept definition

template<typename T>
concept vcl::ColorConcept = requires (
T&& obj,
typename RemoveRef<T>::ColorABGR cABGR,
uint32_t u32,
uint16_t u16,
uint8_t u8,
float f,
typename RemoveRef<T>::Format fr) {
typename RemoveRef<T>::Representation;
typename RemoveRef<T>::Format;
typename RemoveRef<T>::ColorABGR;
typename RemoveRef<T>::ColorMap;
RemoveRef<T>();
RemoveRef<T>(cABGR);
RemoveRef<T>(u32, fr);
RemoveRef<T>(u8, u8, u8);
RemoveRef<T>(u8, u8, u8, u8);
RemoveRef<T>(obj);
{ obj.red() } -> std::convertible_to<uint8_t>;
{ obj.green() } -> std::convertible_to<uint8_t>;
{ obj.blue() } -> std::convertible_to<uint8_t>;
{ obj.alpha() } -> std::convertible_to<uint8_t>;
{ obj.redF() } -> std::same_as<float>;
{ obj.greenF() } -> std::same_as<float>;
{ obj.blueF() } -> std::same_as<float>;
{ obj.alphaF() } -> std::same_as<float>;
{ obj.hsvHue() } -> std::same_as<uint8_t>;
{ obj.hsvSaturation() } -> std::same_as<uint8_t>;
{ obj.hsvHueF() } -> std::same_as<float>;
{ obj.hsvSaturationF() } -> std::same_as<float>;
{ obj.rgba() } -> std::same_as<uint32_t>;
{ obj.bgra() } -> std::same_as<uint32_t>;
{ obj.bgr5() } -> std::same_as<unsigned short>;
{ obj.rgb5() } -> std::same_as<unsigned short>;
{ obj == obj } -> std::same_as<bool>;
{ obj != obj } -> std::same_as<bool>;
{ obj < obj } -> std::same_as<bool>;
requires IsConst<T> || requires {
{ obj.red() } -> std::same_as<uint8_t&>;
{ obj.green() } -> std::same_as<uint8_t&>;
{ obj.blue() } -> std::same_as<uint8_t&>;
{ obj.alpha() } -> std::same_as<uint8_t&>;
{ obj.setAlpha(u8) } -> std::same_as<void>;
{ obj.setRed(u8) } -> std::same_as<void>;
{ obj.setGreen(u8) } -> std::same_as<void>;
{ obj.setBlue(u8) } -> std::same_as<void>;
{ obj.setRgb(u8, u8, u8) } -> std::same_as<void>;
{ obj.setRgb(u8, u8, u8, u8) } -> std::same_as<void>;
{ obj.set(u32, fr) } -> std::same_as<void>;
{ obj.setAbgr(u32) } -> std::same_as<void>;
{ obj.setArgb(u32) } -> std::same_as<void>;
{ obj.setRgba(u32) } -> std::same_as<void>;
{ obj.setBgra(u32) } -> std::same_as<void>;
{ obj.setBgr5(u16) } -> std::same_as<void>;
{ obj.setRgb5(u16) } -> std::same_as<void>;
{ obj.setHsv(u8, u8, u8) } -> std::same_as<void>;
{ obj.setHsv(u8, u8, u8, u8) } -> std::same_as<void>;
{ obj.setAlphaF(f) } -> std::same_as<void>;
{ obj.setRedF(f) } -> std::same_as<void>;
{ obj.setGreenF(f) } -> std::same_as<void>;
{ obj.setBlueF(f) } -> std::same_as<void>;
{ obj.setRgbF(f, f, f) } -> std::same_as<void>;
{ obj.setRgbF(f, f, f, f) } -> std::same_as<void>;
{ obj.setHsvF(f, f, f) } -> std::same_as<void>;
{ obj.setHsvF(f, f, f, f) } -> std::same_as<void>;
};
}
A class representing a line segment in n-dimensional space. The class is parameterized by a PointConc...
Definition segment.h:43
ColorConcept is satisfied only if a class provides the member functions specified in this concept....
Definition color.h:41

Detailed Description

ColorConcept is satisfied only if a class provides the member functions specified in this concept. These member functions allows to access to the color components of a given color.