Inheritance diagram for ImageFilterSwap:


Public Member Functions | |
| ImageFilterSwap () | |
| virtual | ~ImageFilterSwap () |
| char * | GetDescription () const |
| void | LeftRight (uint8_t *pixels, int width, int height, double position) |
| void | TopBottom (uint8_t *pixels, int width, int height, double position) |
| void | FilterFrame (uint8_t *pixels, int width, int height, double position, double frame_delta) |
| void | AttachWidgets (GtkBin *bin) |
| void | DetachWidgets (GtkBin *bin) |
Private Attributes | |
| GtkWidget * | window |
| int | type |
Definition at line 459 of file image_filters.cc.
|
|
Definition at line 466 of file image_filters.cc. References magick_glade, Repaint(), and window. 00467 {
00468 window = glade_xml_get_widget( magick_glade, "image_filter_swap" );
00469 GtkWidget* widget = glade_xml_get_widget( magick_glade, "optionmenu_swap" );
00470 g_signal_connect( G_OBJECT( widget ), "changed", G_CALLBACK( Repaint ), 0 );
00471 }
|
|
|
Definition at line 473 of file image_filters.cc. References window. 00474 {
00475 gtk_widget_destroy( window );
00476 }
|
|
|
Reimplemented from GDKImageFilter. Definition at line 532 of file image_filters.cc. References window. 00533 {
00534 gtk_widget_reparent( ( GTK_BIN( window ) ) ->child, GTK_WIDGET( bin ) );
00535 }
|
|
|
Reimplemented from GDKImageFilter. Definition at line 537 of file image_filters.cc. References window. 00538 {
00539 gtk_widget_reparent( ( GTK_BIN( bin ) ) ->child, GTK_WIDGET( window ) );
00540 }
|
|
||||||||||||||||||||||||
|
Implements ImageFilter. Definition at line 520 of file image_filters.cc. References LeftRight(), lookup_widget(), TopBottom(), type, and window. 00521 {
00522 GtkMenu * menu = GTK_MENU( gtk_option_menu_get_menu( GTK_OPTION_MENU( lookup_widget( window, "optionmenu_swap" ) ) ) );
00523 GtkWidget *active_item = gtk_menu_get_active( menu );
00524 type = g_list_index ( GTK_MENU_SHELL ( menu ) ->children, active_item );
00525
00526 if ( type == 0 )
00527 LeftRight( pixels, width, height, position );
00528 else if ( type == 1 )
00529 TopBottom( pixels, width, height, position );
00530 }
|
|
|
Implements ImageFilter. Definition at line 478 of file image_filters.cc. 00479 {
00480 return _( "Flip" );
00481 }
|
|
||||||||||||||||||||
|
Definition at line 483 of file image_filters.cc. Referenced by FilterFrame(). 00484 {
00485 uint8_t r, g, b;
00486 uint8_t *p = pixels;
00487 for ( int y = 0; y < height; y ++ )
00488 {
00489 uint8_t *i = p + y * width * 3;
00490 uint8_t *o = p + ( y + 1 ) * width * 3 - 1;
00491 for ( int x = 0; x < width / 2; x ++ )
00492 {
00493 r = *i;
00494 g = *( i + 1 );
00495 b = *( i + 2 );
00496 *i ++ = *( o - 2 );
00497 *i ++ = *( o - 1 );
00498 *i ++ = *o;
00499 *o -- = b;
00500 *o -- = g;
00501 *o -- = r;
00502 }
00503 }
00504 }
|
|
||||||||||||||||||||
|
Definition at line 506 of file image_filters.cc. Referenced by FilterFrame(). 00507 {
00508 uint8_t * p = pixels;
00509 uint8_t keyFrame[ 720 * 3 ];
00510 for ( int y = 0; y < height / 2; y ++ )
00511 {
00512 uint8_t *i = p + y * width * 3;
00513 uint8_t *o = p + ( height - y - 1 ) * width * 3;
00514 memcpy( keyFrame, i, width * 3 );
00515 memcpy( i, o, width * 3 );
00516 memcpy( o, keyFrame, width * 3 );
00517 }
00518 }
|
|
|
Definition at line 463 of file image_filters.cc. Referenced by FilterFrame(). |
|
|
Definition at line 462 of file image_filters.cc. Referenced by AttachWidgets(), DetachWidgets(), FilterFrame(), ImageFilterSwap(), and ~ImageFilterSwap(). |
1.4.2