Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

ImageTransitionFade Class Reference

Fade transitions. More...

Inheritance diagram for ImageTransitionFade:

Inheritance graph
[legend]
Collaboration diagram for ImageTransitionFade:

Collaboration graph
[legend]
List of all members.

Public Member Functions

char * GetDescription () const
void GetFrame (uint8_t *io, uint8_t *mesh, int width, int height, double position, double frame_delta, bool reverse)

Detailed Description

Fade transitions.

Definition at line 110 of file image_transitions.cc.


Member Function Documentation

char* ImageTransitionFade::GetDescription  )  const [inline, virtual]
 

Implements ImageTransition.

Definition at line 113 of file image_transitions.cc.

00114     {
00115         return _( "Dissolve" );
00116     }

void ImageTransitionFade::GetFrame uint8_t *  io,
uint8_t *  mesh,
int  width,
int  height,
double  position,
double  frame_delta,
bool  reverse
[inline, virtual]
 

Implements ImageTransition.

Definition at line 118 of file image_transitions.cc.

00119     {
00120         uint8_t * k = mesh;
00121         uint8_t *p = io;
00122         uint8_t r, g, b;
00123         uint8_t kr, kg, kb;
00124 
00125         if ( reverse )
00126             position = 1 - position;
00127 
00128         while ( p < ( io + width * height * 3 ) )
00129         {
00130             r = *p;
00131             g = *( p + 1 );
00132             b = *( p + 2 );
00133             kr = *k ++;
00134             kg = *k ++;
00135             kb = *k ++;
00136             int vr = ( int ) ( kr * position + r * ( 1 - position ) );
00137             int vg = ( int ) ( kg * position + g * ( 1 - position ) );
00138             int vb = ( int ) ( kb * position + b * ( 1 - position ) );
00139             *p ++ = vr < 0xff ? ( uint8_t ) vr : 0xff;
00140             *p ++ = vg < 0xff ? ( uint8_t ) vg : 0xff;
00141             *p ++ = vb < 0xff ? ( uint8_t ) vb : 0xff;
00142         }
00143     }


The documentation for this class was generated from the following file:
Generated on Sun Mar 11 22:13:06 2007 for Kino by  doxygen 1.4.2