TPixel


This template structure has been removed in release 10.0.0. Use ntl::TPixel template structure instead.

Describes pixel of image.

You can find more information in comments below.

template<unsigned char Channels, class Type>
    struct TPixel
    {
        Type Data[Channels]; // Channels 
    
        const Type &operator[](const unsigned char channel) const; // Get channel value 
        Type &operator[](const unsigned char channel); // Get channel value 
        TPixel &operator*=(const TPixel &other); // Blend 
        TPixel &operator+=(const TPixel &other); // Add(blCanvas mode) 
        bool operator==(const TPixel &other) const; // Compare for equality 
        bool operator!=(const TPixel &other) const; // Compare for equality 
        // Since 6.0.0 
        ChannelType average() const; // Return average value over all channels except the last one(grayscale) 
    };
Namespace: nitisa::graphics
Include: Nitisa/Modules/Graphics/Pixel.h