cropper
diff callbacks.c @ 10:5e282003f0c1
minor changes; besser indenting
author | meillo@marmaro.de |
---|---|
date | Thu, 04 Mar 2010 13:54:17 +0100 |
parents | 7e1cf00de1df |
children | c18ba4ea1514 |
line diff
1.1 --- a/callbacks.c Thu Mar 20 20:01:38 2008 +0100 1.2 +++ b/callbacks.c Thu Mar 04 13:54:17 2010 +0100 1.3 @@ -7,7 +7,7 @@ 1.4 1.5 int image_width; 1.6 int image_height; 1.7 -float inc = 0.1; 1.8 +float inc = 0.3; 1.9 /* 1.10 void update_spin_button_ratio(GtkWidget* spinbutton) { 1.11 g_print("ratio change: %f\n", ratio); 1.12 @@ -169,7 +169,7 @@ 1.13 static GdkPixbuf* pixbuf_new; 1.14 g_object_unref(pixbuf_new); 1.15 1.16 - pixbuf_new = gdk_pixbuf_scale_simple(image_buffer, image_width, image_height, GDK_INTERP_HYPER); 1.17 + pixbuf_new = gdk_pixbuf_scale_simple(image_buffer, image_width, image_height, GDK_INTERP_BILINEAR); 1.18 gtk_image_set_from_pixbuf((GtkImage*) lookup_widget(cropper_window, "image_area"), pixbuf_new); 1.19 } 1.20 1.21 @@ -227,6 +227,21 @@ 1.22 void on_cropper_window_create(GtkObject* object, gpointer user_data) { 1.23 image_width = gdk_pixbuf_get_width(image_buffer); 1.24 image_height = gdk_pixbuf_get_height(image_buffer); 1.25 + 1.26 + /* 1.27 + image_buffer = gdk_pixbuf_new_from_file(image_filename, NULL); 1.28 + image_area = gtk_image_new_from_pixbuf(image_buffer); 1.29 + 1.30 + int w, h; 1.31 + GtkWidget* image_a; 1.32 + 1.33 + image_a = (GtkWidget*) lookup_widget(cropper_window, "image_area"); 1.34 + gdk_drawable_get_size (image_a->window, &w, &h); 1.35 + 1.36 + image_width = w - 200; 1.37 + image_height = h - 150; 1.38 + set_zoom(); 1.39 + */ 1.40 } 1.41 1.42 void on_cropper_window_destroy(GtkObject* object, gpointer user_data) {