Beatmup
Beatmup::QuadFloatBitmapReader Class Reference

Quad float bitmap reader. More...

#include <bitmap_access.h>

Inheritance diagram for Beatmup::QuadFloatBitmapReader:
Beatmup::CustomBitmapScanner< pixfloat, 4 > Beatmup::QuadFloatBitmapWriter

Public Types

typedef pixfloat4 pixtype
 
- Public Types inherited from Beatmup::CustomBitmapScanner< pixfloat, 4 >
typedef pixfloat pixvaltype
 

Public Member Functions

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

Additional Inherited Members

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

Detailed Description

Quad float bitmap reader.

Definition at line 300 of file bitmap_access.h.

Member Typedef Documentation

◆ pixtype

Constructor & Destructor Documentation

◆ QuadFloatBitmapReader()

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

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

pixfloat4 Beatmup::QuadFloatBitmapReader::operator() ( ) const
inline

Definition at line 306 of file bitmap_access.h.

306  {
307  return pixfloat4(ptr[CHANNELS_4.R], ptr[CHANNELS_4.G], ptr[CHANNELS_4.B], ptr[CHANNELS_4.A]);
308  }
pixfloat * ptr
pointer to the current pixel
Definition: bitmap_access.h:69
static const struct Beatmup::@1 CHANNELS_4

◆ operator()() [2/2]

pixfloat4 Beatmup::QuadFloatBitmapReader::operator() ( int  x,
int  y 
) const
inline

Definition at line 310 of file bitmap_access.h.

310  {
311  int i = 4 * (y * width + x);
312  return pixfloat4(data[i + CHANNELS_4.R], data[i + CHANNELS_4.G], data[i + CHANNELS_4.B], data[i + CHANNELS_4.A]);
313  }

◆ at()

pixfloat4 Beatmup::QuadFloatBitmapReader::at ( int  x,
int  y 
) const
inline

Definition at line 315 of file bitmap_access.h.

315  {
316  int i = 4 * (y * width + x);
317  return pixfloat4(ptr[i + CHANNELS_4.R], ptr[i + CHANNELS_4.G], ptr[i + CHANNELS_4.B], ptr[i + CHANNELS_4.A]);
318  }

◆ operator[]()

const pixfloat4 Beatmup::QuadFloatBitmapReader::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 323 of file bitmap_access.h.

323  {
324  const pixfloat* p = ptr + 4 * i;
325  return pixfloat4(p[CHANNELS_4.R], p[CHANNELS_4.G], p[CHANNELS_4.B], p[CHANNELS_4.A]);
326  }
float pixfloat
Definition: basic_types.h:35
Beatmup::IntPoint p((int) x,(int) y)

Member Data Documentation

◆ MAX_VALUE

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

Definition at line 304 of file bitmap_access.h.


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