Beatmup
Beatmup::QuadByteBitmapReader Class Reference

Quad byte bitmap reader. More...

#include <bitmap_access.h>

Inheritance diagram for Beatmup::QuadByteBitmapReader:
Beatmup::CustomBitmapScanner< pixbyte, 4 > Beatmup::QuadByteBilinearInterpolator Beatmup::QuadByteBitmapWriter

Public Types

typedef pixint4 pixtype
 
- Public Types inherited from Beatmup::CustomBitmapScanner< pixbyte, 4 >
typedef pixbyte pixvaltype
 

Public Member Functions

pixint4 operator() () const
 
pixint4 operator() (int x, int y) const
 
const pixint4 operator[] (int i) const
 Retrieves a value at position shifted by i pixels in scanline order with respect to the current position. More...
 
 QuadByteBitmapReader (const AbstractBitmap &bitmap, int x=0, int y=0)
 
- Public Member Functions inherited from Beatmup::CustomBitmapScanner< pixbyte, 4 >
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, 4 >
const int NUMBER_OF_CHANNELS
 

Additional Inherited Members

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

Detailed Description

Quad byte bitmap reader.

Definition at line 211 of file bitmap_access.h.

Member Typedef Documentation

◆ pixtype

Constructor & Destructor Documentation

◆ QuadByteBitmapReader()

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

Definition at line 234 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]

pixint4 Beatmup::QuadByteBitmapReader::operator() ( ) const
inline

Definition at line 217 of file bitmap_access.h.

217  {
218  return pixint4(ptr[CHANNELS_4.R], ptr[CHANNELS_4.G], ptr[CHANNELS_4.B], ptr[CHANNELS_4.A]);
219  }
pixbyte * ptr
pointer to the current pixel
Definition: bitmap_access.h:69
static const struct Beatmup::@1 CHANNELS_4

◆ operator()() [2/2]

pixint4 Beatmup::QuadByteBitmapReader::operator() ( int  x,
int  y 
) const
inline

Definition at line 221 of file bitmap_access.h.

221  {
222  int i = 4 * (y * width + x);
223  return pixint4(data[i + CHANNELS_4.R], data[i + CHANNELS_4.G], data[i + CHANNELS_4.B], data[i + CHANNELS_4.A]);
224  }

◆ operator[]()

const pixint4 Beatmup::QuadByteBitmapReader::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 229 of file bitmap_access.h.

229  {
230  const pixbyte* p = ptr + 4 * i;
231  return pixint4(p[CHANNELS_4.R], p[CHANNELS_4.G], p[CHANNELS_4.B], p[CHANNELS_4.A]);
232  }
uint8_t pixbyte
Definition: basic_types.h:34
Beatmup::IntPoint p((int) x,(int) y)

Member Data Documentation

◆ MAX_VALUE

const int Beatmup::QuadByteBitmapReader::MAX_VALUE = 255

Definition at line 215 of file bitmap_access.h.


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