Enlightenment CVS committal
Author : titan
Project : e17
Module : proto
Dir : e17/proto/ephoto/src/bin
Modified Files:
ephoto_gui.c ephoto_imaging.c
Log Message:
Image manipulation code for testing.
===================================================================
RCS file: /cvs/e/e17/proto/ephoto/src/bin/ephoto_gui.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -3 -r1.19 -r1.20
--- ephoto_gui.c 8 Jan 2007 05:38:22 -0000 1.19
+++ ephoto_gui.c 11 Jan 2007 23:25:47 -0000 1.20
@@ -16,12 +16,16 @@
static void add_menu_item(Ewl_Widget *c, char *txt, char *img, void *cb);
static Ewl_Widget *add_tree(Ewl_Widget *c);
-/*Ephoto MVC Callbacks */
+/*Ephoto MVC Callbacks*/
static Ewl_Widget *directory_view_new(void);
static void directory_view_assign(Ewl_Widget *w, void *data);
static void *directory_data_fetch(void *data, unsigned int row, unsigned int
column);
static int directory_data_count(void *data);
+/*Ephoto Image Manipulation*/
+static void rotate_image_left(Ewl_Widget *w, void *event, void *data);
+static void rotate_image_right(Ewl_Widget *w, void *event, void *data);
+
/*Ephoto Widget Global Variables*/
static Ewl_Widget *ftree, *atree, *fbox, *vnb;
static Ewl_Widget *cvbox, *ivbox, *vimage, *progress;
@@ -338,6 +342,31 @@
ewl_widget_configure(fbox);
}
+/*Rotate the image 90 degrees to the left*/
+static void rotate_image_left(Ewl_Widget *w, void *event, void *data)
+{
+ unsigned int *image_data;
+ int nw, nh;
+
+ evas_object_image_size_get(EWL_IMAGE(vimage)->image, &nh, &nw);
+ image_data = rotate_left(vimage);
+ update_image(vimage, nw, nh, image_data);
+ ewl_widget_configure(vimage);
+ ewl_widget_configure(vimage->parent);
+}
+
+static void rotate_image_right(Ewl_Widget *w, void *event, void *data)
+{
+ unsigned int *image_data;
+ int nw, nh;
+
+ evas_object_image_size_get(EWL_IMAGE(vimage)->image, &nh, &nw);
+ image_data = rotate_right(vimage);
+ update_image(vimage, nw, nh, image_data);
+ ewl_widget_configure(vimage);
+ ewl_widget_configure(vimage->parent);
+}
+
/*Create the Main Ephoto Window*/
static void create_main_gui(void)
{
@@ -401,7 +430,6 @@
ewl_object_fill_policy_set(EWL_OBJECT(ivbox), EWL_FLAG_FILL_ALL);
ewl_container_child_append(EWL_CONTAINER(vnb), ivbox);
ewl_widget_show(ivbox);
- ewl_notebook_page_tab_text_set(EWL_NOTEBOOK(vnb), ivbox, "Viewer");
sp = ewl_scrollpane_new();
ewl_object_fill_policy_set(EWL_OBJECT(sp), EWL_FLAG_FILL_ALL);
@@ -420,7 +448,9 @@
ewl_object_alignment_set(EWL_OBJECT(ihbox), EWL_FLAG_ALIGN_CENTER);
ewl_object_fill_policy_set(EWL_OBJECT(ihbox), EWL_FLAG_FILL_SHRINK);
ewl_widget_show(ihbox);
-
+
+ add_button(ihbox, "Rotate Left", NULL, rotate_image_left);
+ add_button(ihbox, "Rotate Right", NULL, rotate_image_right);
add_button(ihbox, "Return to Catalog", NULL, view_catalog);
directories = ecore_list_new();
===================================================================
RCS file: /cvs/e/e17/proto/ephoto/src/bin/ephoto_imaging.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- ephoto_imaging.c 11 Jan 2007 23:14:28 -0000 1.1
+++ ephoto_imaging.c 11 Jan 2007 23:25:47 -0000 1.2
@@ -12,9 +12,6 @@
evas_object_image_size_set(EWL_IMAGE(image)->image, w, h);
evas_object_image_data_set(EWL_IMAGE(image)->image, data);
evas_object_image_data_update_add(EWL_IMAGE(image)->image, 0,
0, w, h);
- ewl_image_size_set(EWL_IMAGE(image), w, h);
- ewl_image_proportional_set(EWL_IMAGE(image), TRUE);
- ewl_widget_configure(image);
}
}
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs