Namespace color::trait

TOC

Description

Every color model/format combination has its own traits. Those traits can be retrieved in run or compile time.

List

bound
Description
Retrieve minimum, maximum and range of specified category.
Members
minimum
Description
Return minimum for given index.
Example
//This will print 0.
std::count << ::color::rgb<double>::bound_type::minimum( 1 ) << std::endl;
maximum
Description
Return maximum for given index.
Example
//This will print 360.
std::count << ::color::hsl<double>::bound_type::maximum( 0 ) << std::endl;
range
Description
Return range for given index.
Equivalent to maximum( index )- minimum( index )
Example
//This will print 1.045182091.
std::count << ::color::yiq<double>::bound_type::range( 2 ) << std::endl;
container
Description
Contain color component in some it specific manner. Instance, input/output parameters, return (non)modifiable types.
Members
get
Description
Get component for given index.
Declaration
static component_return_const_type get( model_type container, index_input_const_type index );
Example
TODO
get
Description
Get component for given index supplied in template.
Declaration
template< index_instance_type index> static component_return_const_type get( model_type container );
Example
TODO
set
Description
Set component for given index and value.
Declaration
static set_return_type set( input_type container, index_input_const_type index, component_input_const_type value );
Example
TODO
set
Description
Set component for given index and value.
Declaration
template< index_instance_type index > static component_return_const_type get( model_type container );
Example
TODO
size
Description
Get size of container.
Declaration
static index_return_image_type size();
Example
TODO
diagonal
Description
Return distance between two the most far color by using euclidean distance.
Members
value
Description
Return distance betwen two the most far colors.
Example
std::count << ::color::trait::diagonal< ::color::yiq<double>::category_type >::value() << std::endl;
index
Description
Type used to iterate trough color's components .
Members
instance_type
Description
Type to use to make instance of index
Example
TODO ::color::trait::index<::color::rgb<double>>::instance_type;
const_type
Description
Type to use to make constant instance of index
Example
TODO ::color::trait::index<::color::rgb<double>>::const_type;
return_image_type
Description
Returned index which can not be modified.
Example
TODO ::color::trait::index<::color::rgb<double>>::return_image_type;
return_type
Description
Returned index without guaranteed properties
Example
TODO ::color::trait::index<::color::rgb<double>>::return_type;
return_original_type
Description
Returned index which can be modified.
Example
TODO ::color::trait::index<::color::rgb<double>>::return_original_type;
model_type
Description
Parameter type which is not modifiable.
Example
TODO ::color::trait::index<::color::rgb<double>>::model_type;
input_type
Description
Parameter type which might be modifiable.
Example
TODO ::color::trait::index<::color::rgb<double>>::input_type;
info
Description
Miscelaneus information about model/format.
Members
implemented_entity
Description
Is model/format implementes
Example
TODO ::color::trait::info<::color::rgb<double>>::implemented_entity;
meaningful_entity
Description
Is model/fomrat combination have meaning.
Example
TODO ::color::trait::info<::color::rgb<double>>::meaningful_entity;
overburn_entity
Description
Is possible to overburn.
Example
TODO ::color::trait::info<::color::rgb<double>>::overburn_entity;
size_entity
Description
Number of components
Example
TODO ::color::trait::info<::color::rgb<double>>::size_entity;
scalar
Description
float like number ( usually double ) used for operations that require more precision that component can give.
Members
instance_type
Description
Type to use to make instance of scalar
Example
TODO ::color::scalar::index<::color::rgb<double>>::instance_type;
const_type
Description
Type to use to make constant instance of scalar
Example
TODO ::color::scalar::index<::color::rgb<double>>::const_type;
return_image_type
Description
Returned scalar which can not be modified.
Example
TODO ::color::scalar::index<::color::rgb<double>>::return_image_type;
return_type
Description
Returned scalar without guaranteed properties
Example
TODO ::color::scalar::index<::color::rgb<double>>::return_type;
return_original_type
Description
Returned scalar which can be modified.
Example
TODO ::color::scalar::index<::color::rgb<double>>::return_original_type;
model_type
Description
Parameter type which is not modifiable.
Example
TODO ::color::scalar::index<::color::rgb<double>>::model_type;
input_type
Description
Parameter type which might be modifiable.
Example
TODO ::color::scalar::index<::color::rgb<double>>::input_type;
size
Description
Type used to return size of container.
Members
instance_type
Description
Type to use to make instance of size
Example
TODO ::color::trait::size<::color::rgb<double>>::instance_type;
const_type
Description
Type to use to make constant instance of size
Example
TODO ::color::trait::size<::color::rgb<double>>::const_type;
return_image_type
Description
Returned size which can not be modified.
Example
TODO ::color::trait::size<::color::rgb<double>>::return_image_type;
return_type
Description
Returned size without guaranteed properties
Example
TODO ::color::trait::size<::color::rgb<double>>::return_type;
return_original_type
Description
Returned size which can be modified.
Example
TODO ::color::trait::size<::color::rgb<double>>::return_original_type;
model_type
Description
Parameter type which is not modifiable.
Example
TODO ::color::trait::size<::color::rgb<double>>::model_type;
input_type
Description
Parameter type which might be modifiable.
Example
TODO ::color::trait::size<::color::rgb<double>>::input_type;