Beatmup
Beatmup::SingleFloatBitmapReader Class Reference

Single float bitmap reader. More...

#include <bitmap_access.h>

Inheritance diagram for Beatmup::SingleFloatBitmapReader:
Beatmup::CustomBitmapScanner< pixfloat, 1 > Beatmup::SingleFloatBitmapWriter

Public Types

typedef pixfloat1 pixtype
 
- Public Types inherited from Beatmup::CustomBitmapScanner< pixfloat, 1 >
typedef pixfloat pixvaltype
 

Public Member Functions

pixfloat1 operator() () const
 
pixfloat1 operator() (int x, int y) const
 
const pixfloat1 operator[] (int i) const
 Retrieves a value at position shifted by i pixels in scanline order with respect to the current position. More...
 
 SingleFloatBitmapReader (const AbstractBitmap &bitmap, int x=0, int y=0)
 
- Public Member Functions inherited from Beatmup::CustomBitmapScanner< pixfloat, 1 >
bool operator< (const CustomBitmapScanner &another) const
 
pixfloatoperator* () 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 float MAX_VALUE = 1.0f
 
- Public Attributes inherited from Beatmup::CustomBitmapScanner< pixfloat, 1 >
const int NUMBER_OF_CHANNELS
 

Additional Inherited Members

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

Detailed Description

Single float bitmap reader.

Definition at line 241 of file bitmap_access.h.

Member Typedef Documentation

◆ pixtype

Constructor & Destructor Documentation

◆ SingleFloatBitmapReader()

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

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

pixfloat1 Beatmup::SingleFloatBitmapReader::operator() ( ) const
inline

Definition at line 247 of file bitmap_access.h.

247  {
248  return pixfloat1{ *ptr };
249  }
pixfloat * ptr
pointer to the current pixel
Definition: bitmap_access.h:69

◆ operator()() [2/2]

pixfloat1 Beatmup::SingleFloatBitmapReader::operator() ( int  x,
int  y 
) const
inline

Definition at line 251 of file bitmap_access.h.

251  {
252  return pixfloat1{ data[y * width + x] };
253  }

◆ operator[]()

const pixfloat1 Beatmup::SingleFloatBitmapReader::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 258 of file bitmap_access.h.

258  {
259  return pixfloat1{ ptr[i] };
260  }

Member Data Documentation

◆ MAX_VALUE

const float Beatmup::SingleFloatBitmapReader::MAX_VALUE = 1.0f

Definition at line 245 of file bitmap_access.h.


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