Pixel concepts

Pixel

Let Pix be a type that models Pixel (details).

Then Pix also models Regular (fundamentals)

Types

Then we can define :

Definition Description Requirement
Pix::point_type type of a point models Point concept
Pix::value_type type of a value
  • models Value concept
  • non-const
  • not a reference
Pix::image_type type of the image models Image concept
Pix::reference type of a reference on a value  

Expressions

Let :
  • pix be an instance of Pix.
  • pix_cpy be an instance of Pix.
  • cpix be an instance of const Pix.
  • lhs be an instance of const Pix.
  • rhs be an instance of const Pix.

Then we have the following valid expressions :

Expression Return type Pre-condition Post-condition Description
pix() Pix none none Constructs a pixel pix of type Pix
cpix() const Pix none none Constructs a pixel cpix of type Pix
pix_cpy(pix) Pix none none Copy-constructs a pixel pix_cpy from pix
pix_cpy(cpix) Pix none none Copy-constructs a pixel pix_cpy from cpix
pix_cpy(move(pix)) Pix none none Move-constructs a pixel pix_cpy from pix
pix_cpy = pix Pix& none none Assign pix to pix_cpy
pix_cpy = cpix Pix& none none Assign cpix to pix_cpy
pix_cpy = move(pix) Pix& none none Move-assign pix to pix_cpy
lhs == rhs bool none none Compare wether two pixels are equal
lhs != rhs bool none none Compare wether two pixels are different
rhs == lhs bool none none Compare wether two pixels are equal
rhs != lhs bool none none Compare wether two pixels are different
pix.value() reference none none Access the value of the pixel pix
pix.point() point_type none none Access the point of the pixel pix
pix.image() image_type none none Access the image of the pixel pix
cpix.value() const reference none none Access the value of the pixel pix
cpix.point() const point_type none none Access the point of the pixel pix
cpix.image() const image_type none none Access the image of the pixel pix

TransformedPixel

Let (TPix, FromPix) be a couple of types that models TransformedPixel (details).

Then TPix also models Pixel

Then FromPix also models Pixel

Types

Let TPix inherit all types defined for Pixel.

Then we can define :

Definition Description Requirement
TPix::from_pixel_type = FromPix type of the pixel transformed from models Pixel concept

Expressions

Let TPix inherit all valid expressions defined for Pixel.

ProjectedPixel

Let (PPix, FromPix) be a couple of types that models ProjectedPixel (details).

Then (PPix, FromPix) also models TransformedPixel

Types

Let (PPix, FromPix) inherit all types defined for TransformedPixel.

Expressions

Let (PPix, FromPix) inherit all valid expressions defined for TransformedPixel.

ZippedPixel

Let (ZPix, FromPixs...) be a type-list that models ZippedPixel (details).

Then ZPix also models Pixel

Then FromPixs... also all model Pixel

Types

Let ZPix inherit all types defined for Pixel.

Then we can define :

Definition Description Requirement
ZPix::zipped_pixel_type_list<FromPixs...> type-list of the pixel zipped inside ZPix models ConvertibleTo (fundamentals) concept with : template <typename...> basic_type_list {};

Expressions

Let ZPix inherit all valid expressions defined for Pixel.