Beatmup
Beatmup::SingleByteBitmapReader Class Reference

Single byte bitmap reader. More...

#include <bitmap_access.h>

Inheritance diagram for Beatmup::SingleByteBitmapReader:
Beatmup::CustomBitmapScanner< pixbyte, 1 > Beatmup::SingleByteBilinearInterpolator Beatmup::SingleByteBitmapWriter

Public Types

typedef pixint1 pixtype
 
- Public Types inherited from Beatmup::CustomBitmapScanner< pixbyte, 1 >
typedef pixbyte pixvaltype
 

Public Member Functions

pixint1 operator() () const
 Returns value at current position. More...
 
pixint1 operator() (int x, int y) const
 Returns value at pixel (x,y) position. More...
 
const pixint1 operator[] (int i) const
 Retrieves a value at position shifted by i pixels in scanline order with respect to the current position. More...
 
 SingleByteBitmapReader (const AbstractBitmap &bitmap, int x=0, int y=0)
 
- Public Member Functions inherited from Beatmup::CustomBitmapScanner< pixbyte, 1 >
bool operator< (const CustomBitmapScanner &another) const
 
pixbyteoperator* () const
 
void operator++ (int)
 Move the current position ONE PIXEL forward. More...
 
void operator+= (const int n)
 Move the current position N pixels forward. More...
 
void goTo (int x, int y)
 Changes current position. More...
 
int getWidth () const
 Returns bitmap width in pixels. More...
 
int getHeight () const
 Returns bitmap height in pixels. More...
 
 CustomBitmapScanner (const AbstractBitmap &bitmap, int x=0, int y=0)
 

Public Attributes

const int MAX_VALUE = 255
 
- Public Attributes inherited from Beatmup::CustomBitmapScanner< pixbyte, 1 >
const int NUMBER_OF_CHANNELS
 

Additional Inherited Members

- Protected Member Functions inherited from Beatmup::CustomBitmapScanner< pixbyte, 1 >
pixbytejump (int x, int y) const
 Retrieves pixel address at a given position;. More...
 
- Protected Attributes inherited from Beatmup::CustomBitmapScanner< pixbyte, 1 >
pixbytedata
 bitmap data More...
 
pixbyteptr
 pointer to the current pixel More...
 
int width
 
int height
 bitmap sizes in pixels More...
 

Detailed Description

Single byte bitmap reader.

Definition at line 147 of file bitmap_access.h.

Member Typedef Documentation

◆ pixtype

Constructor & Destructor Documentation

◆ SingleByteBitmapReader()

Beatmup::SingleByteBitmapReader::SingleByteBitmapReader ( const AbstractBitmap bitmap,
int  x = 0,
int  y = 0 
)
inline

Definition at line 174 of file bitmap_access.h.

CustomBitmapScanner(const AbstractBitmap &bitmap, int x=0, int y=0)
jobject jlong jint jint y
jobject jlong jint x
Beatmup::InternalBitmap * bitmap

Member Function Documentation

◆ operator()() [1/2]

pixint1 Beatmup::SingleByteBitmapReader::operator() ( ) const
inline

Returns value at current position.

Definition at line 156 of file bitmap_access.h.

156  {
157  return pixint1{ *ptr };
158  }
pixbyte * ptr
pointer to the current pixel
Definition: bitmap_access.h:69

◆ operator()() [2/2]

pixint1 Beatmup::SingleByteBitmapReader::operator() ( int  x,
int  y 
) const
inline

Returns value at pixel (x,y) position.

Definition at line 163 of file bitmap_access.h.

163  {
164  return pixint1{ data[y * width + x] };
165  }

◆ operator[]()

const pixint1 Beatmup::SingleByteBitmapReader::operator[] ( int  i) const
inline

Retrieves a value at position shifted by i pixels in scanline order with respect to the current position.

Definition at line 170 of file bitmap_access.h.

170  {
171  return pixint1{ ptr[i] };
172  }

Member Data Documentation

◆ MAX_VALUE

const int Beatmup::SingleByteBitmapReader::MAX_VALUE = 255

Definition at line 151 of file bitmap_access.h.


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