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

ImageTransitionBarWipe Class Reference

Bar Wipe transitions. More...

Inheritance diagram for ImageTransitionBarWipe:

Inheritance graph
[legend]
Collaboration diagram for ImageTransitionBarWipe:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ImageTransitionBarWipe ()
virtual ~ImageTransitionBarWipe ()
char * GetDescription () const
void Left (uint8_t *io, uint8_t *mesh, int width, int height, double position)
void Right (uint8_t *io, uint8_t *mesh, int width, int height, double position)
void Down (uint8_t *io, uint8_t *mesh, int width, int height, double position)
void Up (uint8_t *io, uint8_t *mesh, int width, int height, double position)
void GetFrame (uint8_t *pixels, uint8_t *mesh, int width, int height, double position, double frame_delta, bool reverse)
void AttachWidgets (GtkBin *bin)
void DetachWidgets (GtkBin *bin)

Private Attributes

GtkWidget * window
int type

Detailed Description

Bar Wipe transitions.

Definition at line 149 of file image_transitions.cc.


Constructor & Destructor Documentation

ImageTransitionBarWipe::ImageTransitionBarWipe  )  [inline]
 

Definition at line 156 of file image_transitions.cc.

References lookup_widget(), magick_glade, Repaint(), and window.

00157     {
00158         window = glade_xml_get_widget( magick_glade, "image_transition_bar_wipe" );
00159         GtkWidget* widget = lookup_widget( window, "optionmenu_wipe" );
00160         g_signal_connect( G_OBJECT( widget ), "changed", G_CALLBACK( Repaint ), 0 );
00161     }

virtual ImageTransitionBarWipe::~ImageTransitionBarWipe  )  [inline, virtual]
 

Definition at line 163 of file image_transitions.cc.

References window.

00164     {
00165         gtk_widget_destroy( window );
00166     }


Member Function Documentation

void ImageTransitionBarWipe::AttachWidgets GtkBin *  bin  )  [inline, virtual]
 

Reimplemented from GDKImageTransition.

Definition at line 240 of file image_transitions.cc.

References window.

00241     {
00242         gtk_widget_reparent( ( GTK_BIN( window ) ) ->child, GTK_WIDGET( bin ) );
00243     }

void ImageTransitionBarWipe::DetachWidgets GtkBin *  bin  )  [inline, virtual]
 

Reimplemented from GDKImageTransition.

Definition at line 245 of file image_transitions.cc.

References window.

00246     {
00247         gtk_widget_reparent( ( GTK_BIN( bin ) ) ->child, GTK_WIDGET( window ) );
00248     }

void ImageTransitionBarWipe::Down uint8_t *  io,
uint8_t *  mesh,
int  width,
int  height,
double  position
[inline]
 

Definition at line 200 of file image_transitions.cc.

Referenced by GetFrame().

00201     {
00202         int roll_height = ( int ) ( height * position );
00203         memmove( io + roll_height * width * 3, io, ( height - roll_height ) * width * 3 );
00204         for ( int y = 0; y < roll_height; y ++ )
00205         {
00206             uint8_t *p = io + y * width * 3;
00207             uint8_t *k = mesh + ( y + height - roll_height ) * width * 3;
00208             memcpy( p, k, width * 3 );
00209         }
00210     }

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

Implements ImageTransition.

Definition at line 168 of file image_transitions.cc.

00169     {
00170         return _( "Push Wipe" );
00171     }

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

Implements ImageTransition.

Definition at line 224 of file image_transitions.cc.

References Down(), Left(), lookup_widget(), Right(), type, Up(), and window.

00225     {
00226         GtkMenu * menu = GTK_MENU( gtk_option_menu_get_menu( GTK_OPTION_MENU( lookup_widget( window, "optionmenu_wipe" ) ) ) );
00227         GtkWidget *active_item = gtk_menu_get_active( menu );
00228         type = g_list_index ( GTK_MENU_SHELL ( menu ) ->children, active_item );
00229         
00230         if ( type == 0 && !reverse )
00231             Left( pixels, mesh, width, height, position );
00232         else if ( type == 0 && reverse )
00233             Right( pixels, mesh, width, height, position );
00234         else if ( type == 1 && !reverse )
00235             Down( pixels, mesh, width, height, position );
00236         else if ( type == 1 && reverse )
00237             Up( pixels, mesh, width, height, position );
00238     }

void ImageTransitionBarWipe::Left uint8_t *  io,
uint8_t *  mesh,
int  width,
int  height,
double  position
[inline]
 

Definition at line 173 of file image_transitions.cc.

Referenced by GetFrame().

00174     {
00175         int roll_width = ( int ) ( width * position );
00176         for ( int y = 0; y < height; y ++ )
00177         {
00178             uint8_t *k = mesh + y * width * 3;
00179             uint8_t *p = io + y * width * 3;
00180             memmove( p, p + roll_width * 3, ( width * 3 ) - roll_width * 3 );
00181             p = io + ( ( y + 1 ) * width * 3 ) - roll_width * 3;
00182             memcpy( p, k, roll_width * 3 );
00183         }
00184     }

void ImageTransitionBarWipe::Right uint8_t *  io,
uint8_t *  mesh,
int  width,
int  height,
double  position
[inline]
 

Definition at line 186 of file image_transitions.cc.

Referenced by GetFrame().

00187     {
00188         uint8_t temp[ 720 * 3 ];
00189         int roll_width = ( int ) ( width * position );
00190         for ( int y = 0; y < height; y ++ )
00191         {
00192             uint8_t *k = mesh + y * width * 3;
00193             uint8_t *p = io + y * width * 3;
00194             memcpy( temp, k + ( width - roll_width ) * 3, roll_width * 3 );
00195             memcpy( temp + roll_width * 3, p, ( width * 3 ) - roll_width * 3 );
00196             memcpy( p, temp, width * 3 );
00197         }
00198     }

void ImageTransitionBarWipe::Up uint8_t *  io,
uint8_t *  mesh,
int  width,
int  height,
double  position
[inline]
 

Definition at line 212 of file image_transitions.cc.

Referenced by GetFrame().

00213     {
00214         int roll_height = ( int ) ( height * ( 1 - position ) );
00215         memmove( io, io + ( height - roll_height ) * width * 3, roll_height * width * 3 );
00216         for ( int y = roll_height; y < height; y ++ )
00217         {
00218             uint8_t *p = io + y * width * 3;
00219             uint8_t *k = mesh + ( y - roll_height ) * width * 3;
00220             memcpy( p, k, width * 3 );
00221         }
00222     }


Member Data Documentation

int ImageTransitionBarWipe::type [private]
 

Definition at line 153 of file image_transitions.cc.

Referenced by GetFrame().

GtkWidget* ImageTransitionBarWipe::window [private]
 

Definition at line 152 of file image_transitions.cc.

Referenced by AttachWidgets(), DetachWidgets(), GetFrame(), ImageTransitionBarWipe(), and ~ImageTransitionBarWipe().


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