Beatmup
Beatmup::TripleFloatBitmapWriter Class Reference

Triple float bitmap writer. More...

#include <bitmap_access.h>

Inheritance diagram for Beatmup::TripleFloatBitmapWriter:
Beatmup::TripleFloatBitmapReader Beatmup::BitmapContentModifier Beatmup::CustomBitmapScanner< pixfloat, 3 >

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)
 
 TripleFloatBitmapWriter (AbstractBitmap &bitmap, int x=0, int y=0)
 
- Public Member Functions inherited from Beatmup::TripleFloatBitmapReader
pixfloat3 operator() () const
 
pixfloat3 operator() (int x, int y) const
 
const pixfloat3 operator[] (int i) const
 Retrieves a value at position shifted by i pixels in scanline order with respect to the current position. More...
 
 TripleFloatBitmapReader (const AbstractBitmap &bitmap, int x=0, int y=0)
 
- Public Member Functions inherited from Beatmup::CustomBitmapScanner< pixfloat, 3 >
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::TripleFloatBitmapReader
typedef pixfloat3 pixtype
 
- Public Types inherited from Beatmup::CustomBitmapScanner< pixfloat, 3 >
typedef pixfloat pixvaltype
 
- Public Attributes inherited from Beatmup::TripleFloatBitmapReader
const float MAX_VALUE = 1.0f
 
- Public Attributes inherited from Beatmup::CustomBitmapScanner< pixfloat, 3 >
const int NUMBER_OF_CHANNELS
 
- Protected Member Functions inherited from Beatmup::CustomBitmapScanner< pixfloat, 3 >
pixfloatjump (int x, int y) const
 Retrieves pixel address at a given position;. More...
 
- Protected Attributes inherited from Beatmup::CustomBitmapScanner< pixfloat, 3 >
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

Triple float bitmap writer.

Definition at line 695 of file bitmap_access.h.

Constructor & Destructor Documentation

◆ TripleFloatBitmapWriter()

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

Definition at line 781 of file bitmap_access.h.

BitmapContentModifier(AbstractBitmap &bitmap)
Definition: bitmap_access.h:60
TripleFloatBitmapReader(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::TripleFloatBitmapWriter::assign ( int  x)
inline

Definition at line 697 of file bitmap_access.h.

697  {
699  }
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.
static const struct Beatmup::@2 CHANNELS_3

◆ assign() [2/6]

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

Definition at line 701 of file bitmap_access.h.

701  {
705  }
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::TripleFloatBitmapWriter::assign ( int  r,
int  g,
int  b,
int  a 
)
inline

Definition at line 707 of file bitmap_access.h.

707  {
711  }

◆ assign() [4/6]

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

Definition at line 713 of file bitmap_access.h.

713  {
715  }
pixfloat clipPixfloat(pixfloat x)
Clips a floating point pixel value to 0..1 range.

◆ assign() [5/6]

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

Definition at line 717 of file bitmap_access.h.

717  {
721  }

◆ assign() [6/6]

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

Definition at line 723 of file bitmap_access.h.

723  {
727  }

◆ operator<<() [1/6]

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

Definition at line 728 of file bitmap_access.h.

728  {
729  assign(P.x);
730  }

◆ operator<<() [2/6]

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

Definition at line 732 of file bitmap_access.h.

732  {
733  assign(P.r, P.g, P.b);
734  }

◆ operator<<() [3/6]

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

Definition at line 736 of file bitmap_access.h.

736  {
737  ptr[CHANNELS_3.R] = clipPixfloat((P.r * P.a + ptr[CHANNELS_3.R] * (255 - P.a)) / 65025.0f);
738  ptr[CHANNELS_3.G] = clipPixfloat((P.g * P.a + ptr[CHANNELS_3.G] * (255 - P.a)) / 65025.0f);
739  ptr[CHANNELS_3.B] = clipPixfloat((P.b * P.a + ptr[CHANNELS_3.B] * (255 - P.a)) / 65025.0f);
740  }

◆ operator<<() [4/6]

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

Definition at line 742 of file bitmap_access.h.

742  {
743  assign(P.x);
744  }

◆ operator<<() [5/6]

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

Definition at line 746 of file bitmap_access.h.

746  {
747  assign(P.r, P.g, P.b);
748  }

◆ operator<<() [6/6]

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

Definition at line 750 of file bitmap_access.h.

750  {
751  float _a = 1 - P.a;
752  ptr[CHANNELS_3.R] = clipPixfloat(P.r * P.a + ptr[CHANNELS_3.R] * _a);
753  ptr[CHANNELS_3.G] = clipPixfloat(P.g * P.a + ptr[CHANNELS_3.G] * _a);
754  ptr[CHANNELS_3.B] = clipPixfloat(P.b * P.a + ptr[CHANNELS_3.B] * _a);
755  }

◆ operator=() [1/6]

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

Definition at line 757 of file bitmap_access.h.

757  {
758  assign(P.x);
759  }

◆ operator=() [2/6]

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

Definition at line 761 of file bitmap_access.h.

761  {
762  assign(P.r, P.g, P.b);
763  }

◆ operator=() [3/6]

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

Definition at line 765 of file bitmap_access.h.

765  {
766  assign(P.r, P.g, P.b, P.a);
767  }

◆ operator=() [4/6]

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

Definition at line 769 of file bitmap_access.h.

769  {
770  assign(P.x);
771  }

◆ operator=() [5/6]

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

Definition at line 773 of file bitmap_access.h.

773  {
774  assign(P.r, P.g, P.b);
775  }

◆ operator=() [6/6]

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

Definition at line 777 of file bitmap_access.h.

777  {
778  assign(P.r, P.g, P.b, P.a);
779  }

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