libfacade 1.1
A library for manipulating PNG images with payloads.
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Attributes | List of all members
facade::png::AlphaGrayscalePixel< _Base > Class Template Reference

A grayscale pixel with alpha channel. More...

#include <png.hpp>

Inheritance diagram for facade::png::AlphaGrayscalePixel< _Base >:
facade::png::GrayscalePixel< _Base, _Bits > facade::png::Sample< _Base, _Bits >

Public Types

using Base = _Base
 The type base of the samples in this pixel.
 
- Public Types inherited from facade::png::Sample< _Base, _Bits >
using Base = _Base
 The base type used by this sample.
 

Public Member Functions

 AlphaGrayscalePixel ()
 
 AlphaGrayscalePixel (Sample< _Base > value, Sample< _Base > alpha)
 
 AlphaGrayscalePixel (const AlphaGrayscalePixel &other)
 
Sample< _Base > & alpha ()
 The alpha channel of this pixel.
 
const Sample< _Base > & alpha () const
 The const alpha channel of this pixel.
 
- Public Member Functions inherited from facade::png::GrayscalePixel< _Base, _Bits >
 GrayscalePixel ()
 
 GrayscalePixel (_Base value)
 
 GrayscalePixel (const GrayscalePixel &other)
 
- Public Member Functions inherited from facade::png::Sample< _Base, _Bits >
 Sample ()
 
 Sample (Base value)
 
 Sample (const Sample &other)
 
Base operator* () const
 Syntactic sugar to get the value of this sample.
 
Sampleoperator= (Base value)
 Syntactic sugar to assign the value of this sample.
 
Base value () const
 Get the value retained by this sample.
 
void set_value (Base value)
 Assign the given value to this sample.
 

Static Public Attributes

static const std::size_t Bits = Sample<_Base>::Bits*2
 
- Static Public Attributes inherited from facade::png::Sample< _Base, _Bits >
static const std::size_t Bits = _Bits
 The size, in bits, of this sample.
 
static const std::size_t Max = (1 << Bits) - 1
 The maximum value that can be used with this sample.
 

Detailed Description

template<typename _Base = std::uint8_t>
class facade::png::AlphaGrayscalePixel< _Base >

A grayscale pixel with alpha channel.

Template Parameters
_BaseThe base type for the sample value. Can be std::uint8_t or std::uint16_t.
See also
facade::png::AlphaGrayscalePixel8Bit
facade::png::AlphaGrayscalePixel16Bit

Member Typedef Documentation

◆ Base

template<typename _Base = std::uint8_t>
using facade::png::AlphaGrayscalePixel< _Base >::Base = _Base

The type base of the samples in this pixel.

Constructor & Destructor Documentation

◆ AlphaGrayscalePixel() [1/3]

template<typename _Base = std::uint8_t>
facade::png::AlphaGrayscalePixel< _Base >::AlphaGrayscalePixel ( )
inline

◆ AlphaGrayscalePixel() [2/3]

template<typename _Base = std::uint8_t>
facade::png::AlphaGrayscalePixel< _Base >::AlphaGrayscalePixel ( Sample< _Base >  value,
Sample< _Base >  alpha 
)
inline

◆ AlphaGrayscalePixel() [3/3]

template<typename _Base = std::uint8_t>
facade::png::AlphaGrayscalePixel< _Base >::AlphaGrayscalePixel ( const AlphaGrayscalePixel< _Base > &  other)
inline

Member Function Documentation

◆ alpha() [1/2]

template<typename _Base = std::uint8_t>
Sample< _Base > & facade::png::AlphaGrayscalePixel< _Base >::alpha ( )
inline

The alpha channel of this pixel.

◆ alpha() [2/2]

template<typename _Base = std::uint8_t>
const Sample< _Base > & facade::png::AlphaGrayscalePixel< _Base >::alpha ( ) const
inline

The const alpha channel of this pixel.

Member Data Documentation

◆ Bits

template<typename _Base = std::uint8_t>
const std::size_t facade::png::AlphaGrayscalePixel< _Base >::Bits = Sample<_Base>::Bits*2
static

The documentation for this class was generated from the following file: