Inheritance diagram for ImageFilterMirror:


Public Member Functions | |
| ImageFilterMirror () | |
| virtual | ~ImageFilterMirror () |
| char * | GetDescription () const |
| void | LeftRight (uint8_t *pixels, int width, int height, double position) |
| void | RightLeft (uint8_t *pixels, int width, int height, double position) |
| void | TopBottom (uint8_t *pixels, int width, int height, double position) |
| void | BottomTop (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 158 of file image_filters.cc.
|
|
Definition at line 165 of file image_filters.cc. References magick_glade, Repaint(), and window. 00166 {
00167 window = glade_xml_get_widget( magick_glade, "image_filter_mirror" );
00168 GtkWidget* widget = glade_xml_get_widget( magick_glade, "optionmenu_mirror" );
00169 g_signal_connect( G_OBJECT( widget ), "changed", G_CALLBACK( Repaint ), 0 );
00170 }
|
|
|
Definition at line 172 of file image_filters.cc. References window. 00173 {
00174 gtk_widget_destroy( window );
00175 }
|
|
|
Reimplemented from GDKImageFilter. Definition at line 252 of file image_filters.cc. References window. 00253 {
00254 gtk_widget_reparent( ( GTK_BIN( window ) ) ->child, GTK_WIDGET( bin ) );
00255 }
|
|
||||||||||||||||||||
|
Definition at line 225 of file image_filters.cc. Referenced by FilterFrame(). 00226 {
00227 uint8_t * p = pixels;
00228 for ( int y = 0; y < height / 2; y ++ )
00229 {
00230 uint8_t *i = p + ( height - y ) * width * 3;
00231 uint8_t *o = p + y * width * 3;
00232 memcpy( o, i, width * 3 );
00233 }
00234 }
|
|
|
Reimplemented from GDKImageFilter. Definition at line 257 of file image_filters.cc. References window. 00258 {
00259 gtk_widget_reparent( ( GTK_BIN( bin ) ) ->child, GTK_WIDGET( window ) );
00260 }
|
|
||||||||||||||||||||||||
|
Implements ImageFilter. Definition at line 236 of file image_filters.cc. References BottomTop(), LeftRight(), lookup_widget(), RightLeft(), TopBottom(), type, and window. 00237 {
00238 GtkMenu * menu = GTK_MENU( gtk_option_menu_get_menu( GTK_OPTION_MENU( lookup_widget( window, "optionmenu_mirror" ) ) ) );
00239 GtkWidget *active_item = gtk_menu_get_active( menu );
00240 type = g_list_index ( GTK_MENU_SHELL ( menu ) ->children, active_item );
00241
00242 if ( type == 0 )
00243 LeftRight( pixels, width, height, position );
00244 else if ( type == 1 )
00245 RightLeft( pixels, width, height, position );
00246 else if ( type == 2 )
00247 TopBottom( pixels, width, height, position );
00248 else if ( type == 3 )
00249 BottomTop( pixels, width, height, position );
00250 }
|
|
|
Implements ImageFilter. Definition at line 177 of file image_filters.cc. 00178 {
00179 return _( "Mirror" );
00180 }
|
|
||||||||||||||||||||
|
Definition at line 182 of file image_filters.cc. Referenced by FilterFrame(). 00183 {
00184 uint8_t * p = pixels;
00185 for ( int y = 0; y < height; y ++ )
00186 {
00187 uint8_t *i = p + y * width * 3;
00188 uint8_t *o = p + ( y + 1 ) * width * 3 - 1;
00189 for ( ; o > i; o -= 3 )
00190 {
00191 *( o - 2 ) = *i ++;
00192 *( o - 1 ) = *i ++;
00193 *o = *i ++;
00194 }
00195 }
00196 }
|
|
||||||||||||||||||||
|
Definition at line 198 of file image_filters.cc. Referenced by FilterFrame(). 00199 {
00200 uint8_t * p = pixels;
00201 for ( int y = 0; y < height; y ++ )
00202 {
00203 uint8_t *o = p + y * width * 3;
00204 uint8_t *i = p + ( y + 1 ) * width * 3 - 1;
00205 for ( ; i > o; i -= 3 )
00206 {
00207 *o ++ = *( i - 2 );
00208 *o ++ = *( i - 1 );
00209 *o ++ = *i;
00210 }
00211 }
00212 }
|
|
||||||||||||||||||||
|
Definition at line 214 of file image_filters.cc. Referenced by FilterFrame(). 00215 {
00216 uint8_t * p = pixels;
00217 for ( int y = 0; y < height / 2; y ++ )
00218 {
00219 uint8_t *i = p + y * width * 3;
00220 uint8_t *o = p + ( height - y ) * width * 3;
00221 memcpy( o, i, width * 3 );
00222 }
00223 }
|
|
|
Definition at line 162 of file image_filters.cc. Referenced by FilterFrame(). |
|
|
Definition at line 161 of file image_filters.cc. Referenced by AttachWidgets(), DetachWidgets(), FilterFrame(), ImageFilterMirror(), and ~ImageFilterMirror(). |
1.4.2