Beatmup
Beatmup::SingleFloatBitmapWriter Class Reference

Single float bitmap writer. More...

#include <bitmap_access.h>

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

Public Member Functions

void assign (int x)
 
void assign (int r, int g, int b)
 
void assign (int r, int g, int b, int a)
 
void assign (float x)
 
void assign (float r, float g, float b)
 
void assign (float r, float g, float b, float a)
 
void operator<< (const pixint1 &P)
 
void operator<< (const pixint3 &P)
 
void operator<< (const pixint4 &P)
 
void operator<< (const pixfloat1 &P)
 
void operator<< (const pixfloat3 &P)
 
void operator<< (const pixfloat4 &P)
 
void operator= (const pixint1 &P)
 
void operator= (const pixint3 &P)
 
void operator= (const pixint4 &P)
 
void operator= (const pixfloat1 &P)
 
void operator= (const pixfloat3 &P)
 
void operator= (const pixfloat4 &P)
 
 SingleFloatBitmapWriter (AbstractBitmap &bitmap, int x=0, int y=0)
 
- Public Member Functions inherited from Beatmup::SingleFloatBitmapReader
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)
 

Additional Inherited Members

- Public Types inherited from Beatmup::SingleFloatBitmapReader
typedef pixfloat1 pixtype
 
- Public Types inherited from Beatmup::CustomBitmapScanner< pixfloat, 1 >
typedef pixfloat pixvaltype
 
- Public Attributes inherited from Beatmup::SingleFloatBitmapReader
const float MAX_VALUE = 1.0f
 
- Public Attributes inherited from Beatmup::CustomBitmapScanner< pixfloat, 1 >
const int NUMBER_OF_CHANNELS
 
- 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...
 
- Private Member Functions inherited from Beatmup::BitmapContentModifier
 BitmapContentModifier (AbstractBitmap &bitmap)
 

Detailed Description

Single float bitmap writer.

Definition at line 614 of file bitmap_access.h.

Constructor & Destructor Documentation

◆ SingleFloatBitmapWriter()

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

Definition at line 688 of file bitmap_access.h.

BitmapContentModifier(AbstractBitmap &bitmap)
Definition: bitmap_access.h:60
SingleFloatBitmapReader(const AbstractBitmap &bitmap, int x=0, int y=0)
jobject jlong jint jint y
jobject jlong jint x
Beatmup::InternalBitmap * bitmap

Member Function Documentation

◆ assign() [1/6]

void Beatmup::SingleFloatBitmapWriter::assign ( int  x)
inline

Definition at line 616 of file bitmap_access.h.

616  {
617  *ptr = int2pixfloat(x);
618  }
pixfloat * ptr
pointer to the current pixel
Definition: bitmap_access.h:69
pixfloat int2pixfloat(int x)
Converts an integer value to 0..1 floating point pixel value.

◆ assign() [2/6]

void Beatmup::SingleFloatBitmapWriter::assign ( int  r,
int  g,
int  b 
)
inline

Definition at line 620 of file bitmap_access.h.

620  {
621  *ptr = int2pixfloat((r + g + b) / 3);
622  }
jobject jlong jint jint jint jint g
jobject jlong jint jint jint jint jint b
jobject jlong jint jint jint r

◆ assign() [3/6]

void Beatmup::SingleFloatBitmapWriter::assign ( int  r,
int  g,
int  b,
int  a 
)
inline

Definition at line 624 of file bitmap_access.h.

624  {
625  *ptr = int2pixfloat((r + g + b) / 3);
626  }

◆ assign() [4/6]

void Beatmup::SingleFloatBitmapWriter::assign ( float  x)
inline

Definition at line 628 of file bitmap_access.h.

628  {
629  *ptr = clipPixfloat(x);
630  }
pixfloat clipPixfloat(pixfloat x)
Clips a floating point pixel value to 0..1 range.

◆ assign() [5/6]

void Beatmup::SingleFloatBitmapWriter::assign ( float  r,
float  g,
float  b 
)
inline

Definition at line 632 of file bitmap_access.h.

632  {
633  *ptr = clipPixfloat((r + g + b) / 3);
634  }

◆ assign() [6/6]

void Beatmup::SingleFloatBitmapWriter::assign ( float  r,
float  g,
float  b,
float  a 
)
inline

Definition at line 636 of file bitmap_access.h.

636  {
637  *ptr = clipPixfloat((r + g + b) / 3);
638  }

◆ operator<<() [1/6]

void Beatmup::SingleFloatBitmapWriter::operator<< ( const pixint1 P)
inline

Definition at line 640 of file bitmap_access.h.

640  {
641  assign(P.x);
642  }

◆ operator<<() [2/6]

void Beatmup::SingleFloatBitmapWriter::operator<< ( const pixint3 P)
inline

Definition at line 644 of file bitmap_access.h.

644  {
645  assign(P.r, P.g, P.b);
646  }

◆ operator<<() [3/6]

void Beatmup::SingleFloatBitmapWriter::operator<< ( const pixint4 P)
inline

Definition at line 648 of file bitmap_access.h.

648  {
649  *ptr = clipPixfloat(((P.r + P.g + P.b) * P.a + *ptr * (255 - P.a) * 3) / 765.0f);
650  }

◆ operator<<() [4/6]

void Beatmup::SingleFloatBitmapWriter::operator<< ( const pixfloat1 P)
inline

Definition at line 652 of file bitmap_access.h.

652  {
653  assign(P.x);
654  }

◆ operator<<() [5/6]

void Beatmup::SingleFloatBitmapWriter::operator<< ( const pixfloat3 P)
inline

Definition at line 656 of file bitmap_access.h.

656  {
657  assign(P.r, P.g, P.b);
658  }

◆ operator<<() [6/6]

void Beatmup::SingleFloatBitmapWriter::operator<< ( const pixfloat4 P)
inline

Definition at line 660 of file bitmap_access.h.

660  {
661  *ptr = clipPixfloat((P.r + P.g + P.b) * P.a + *ptr * (1 - P.a));
662  }

◆ operator=() [1/6]

void Beatmup::SingleFloatBitmapWriter::operator= ( const pixint1 P)
inline

Definition at line 664 of file bitmap_access.h.

664  {
665  assign(P.x);
666  }

◆ operator=() [2/6]

void Beatmup::SingleFloatBitmapWriter::operator= ( const pixint3 P)
inline

Definition at line 668 of file bitmap_access.h.

668  {
669  assign(P.r, P.g, P.b);
670  }

◆ operator=() [3/6]

void Beatmup::SingleFloatBitmapWriter::operator= ( const pixint4 P)
inline

Definition at line 672 of file bitmap_access.h.

672  {
673  assign(P.r, P.g, P.b, P.a);
674  }

◆ operator=() [4/6]

void Beatmup::SingleFloatBitmapWriter::operator= ( const pixfloat1 P)
inline

Definition at line 676 of file bitmap_access.h.

676  {
677  assign(P.x);
678  }

◆ operator=() [5/6]

void Beatmup::SingleFloatBitmapWriter::operator= ( const pixfloat3 P)
inline

Definition at line 680 of file bitmap_access.h.

680  {
681  assign(P.r, P.g, P.b);
682  }

◆ operator=() [6/6]

void Beatmup::SingleFloatBitmapWriter::operator= ( const pixfloat4 P)
inline

Definition at line 684 of file bitmap_access.h.

684  {
685  assign(P.r, P.g, P.b, P.a);
686  }

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