|
Scroom 0.14-49-gb7ae7a6d
|
#include <bitmap-helpers.hh>


Public Types | |
| using | Base = std::remove_const_t< ConstBase > |
Public Member Functions | |
| SampleIterator (ConstBase *base, int offset=0, int bps_=1) | |
| Base | get () |
| void | set (ConstBase value) |
| SampleIterator & | operator++ () |
| SampleIterator | operator++ (int) |
| SampleIterator & | operator+= (unsigned int x) |
| Base | operator* () |
| bool | operator== (const SampleIterator< ConstBase > &other) const |
| bool | operator!= (const SampleIterator< ConstBase > &other) const |
Public Attributes | |
| const int | bps |
| const int | samplesPerBase |
| const int | pixelOffset |
| const ConstBase | pixelMask |
| ConstBase * | currentBase |
| int | currentOffset |
Static Public Attributes | |
| static const int | bitsPerBase {8 * sizeof(ConstBase) / sizeof(byte)} |
Private Member Functions | |
| SampleIterator (div_t d, ConstBase *base, int bps_) | |
Static Private Member Functions | |
| static Base | mask (int bps) |
Iterate over samples (bits) within a larger type, for example a byte
Allows you to extract (or set) specific bits in a larger datatype, as well as iterate over samples within the larger datatype, or even continuing with the next, if you reach the end of the current one
| Base | the larger type that contains the samples. Typically uint8_t |
| using Scroom::Bitmap::SampleIterator< ConstBase >::Base = std::remove_const_t<ConstBase> |
|
inlineprivate |
|
inlineexplicit |
Construct a new SampleIterator
| base | Pointer to the element that contains the current sample |
| offset | number of the sample within that element |
| bps | Number of bits per sample |
|
inline |
Get the value of the current sample
|
inlinestaticprivate |
|
inline |
|
inline |
Get the value of the current sample
|
inline |
Move to the next sample
|
inline |
Move to the next sample
|
inline |
Move x samples further
|
inline |
|
inline |
Set the value of the current sample
Referenced by Operations::reduce(), OperationsColormapped::reduce(), and Operations1bppClipped::reduce().

|
static |
| const int Scroom::Bitmap::SampleIterator< ConstBase >::bps |
| ConstBase* Scroom::Bitmap::SampleIterator< ConstBase >::currentBase |
Referenced by Scroom::Bitmap::SampleIterator< ConstBase >::get(), Scroom::Bitmap::SampleIterator< ConstBase >::operator*(), Scroom::Bitmap::SampleIterator< ConstBase >::operator++(), Scroom::Bitmap::SampleIterator< ConstBase >::operator++(), Scroom::Bitmap::SampleIterator< ConstBase >::operator+=(), Scroom::Bitmap::SampleIterator< ConstBase >::operator==(), and Scroom::Bitmap::SampleIterator< ConstBase >::set().
| int Scroom::Bitmap::SampleIterator< ConstBase >::currentOffset |
Referenced by Scroom::Bitmap::SampleIterator< ConstBase >::get(), Scroom::Bitmap::SampleIterator< ConstBase >::operator*(), Scroom::Bitmap::SampleIterator< ConstBase >::operator++(), Scroom::Bitmap::SampleIterator< ConstBase >::operator++(), Scroom::Bitmap::SampleIterator< ConstBase >::operator+=(), Scroom::Bitmap::SampleIterator< ConstBase >::operator==(), and Scroom::Bitmap::SampleIterator< ConstBase >::set().
| const ConstBase Scroom::Bitmap::SampleIterator< ConstBase >::pixelMask |
| const int Scroom::Bitmap::SampleIterator< ConstBase >::pixelOffset |
| const int Scroom::Bitmap::SampleIterator< ConstBase >::samplesPerBase |