+2012-08-02 Cedric Bail + + * Fix elm_image_orient_set/get. ... fix what? : 3
------------------------------------ -Regards, Hermet- -----Original Message----- From: "Enlightenment SVN"<[email protected]> To: <[email protected]>; Cc: Sent: 2012-08-02 (목) 17:15:05 Subject: E SVN: cedric IN trunk/elementary: . src/bin src/lib Log: elementary: fix elm_image_orient_get/set and add a test case. Author: cedric Date: 2012-08-02 01:15:05 -0700 (Thu, 02 Aug 2012) New Revision: 74793 Trac: http://trac.enlightenment.org/e/changeset/74793 Added: trunk/elementary/src/bin/test_image.c Modified: trunk/elementary/ChangeLog trunk/elementary/NEWS trunk/elementary/src/bin/Makefile.am trunk/elementary/src/bin/test.c trunk/elementary/src/lib/elm_image.c Modified: trunk/elementary/ChangeLog =================================================================== --- trunk/elementary/ChangeLog2012-08-02 08:10:18 UTC (rev 74792) +++ trunk/elementary/ChangeLog2012-08-02 08:15:05 UTC (rev 74793) @@ -363,3 +363,6 @@ * Patch in incomplete access supoprt in ctxpopup and dayselector. +2012-08-02 Cedric Bail + +* Fix elm_image_orient_set/get. Modified: trunk/elementary/NEWS =================================================================== --- trunk/elementary/NEWS2012-08-02 08:10:18 UTC (rev 74792) +++ trunk/elementary/NEWS2012-08-02 08:15:05 UTC (rev 74793) @@ -22,11 +22,12 @@ Fixes: - * Genlist : Fixed genlist expandable effect bug when we expand/contract items with many children very quickly. - * Genlist : Realize move items during tree effect only when the item is not in the queue. + * Genlist : fixed genlist expandable effect bug when we expand/contract items with many children very quickly. + * Genlist : realize move items during tree effect only when the item is not in the queue. * Add missing files in the tarball. * Fileselector : honor the folder_only option when using EIO * Segment Selector : do not abuse user object item data. + * Image: fixed elm_image_orient_set/get. Improvements: Modified: trunk/elementary/src/bin/Makefile.am =================================================================== --- trunk/elementary/src/bin/Makefile.am2012-08-02 08:10:18 UTC (rev 74792) +++ trunk/elementary/src/bin/Makefile.am2012-08-02 08:15:05 UTC (rev 74793) @@ -75,6 +75,7 @@ test_icon.c \ test_icon_desktops.c \ test_icon_animated.c \ +test_image.c \ test_index.c \ test_inwin.c \ test_label.c \ Modified: trunk/elementary/src/bin/test.c =================================================================== --- trunk/elementary/src/bin/test.c2012-08-02 08:10:18 UTC (rev 74792) +++ trunk/elementary/src/bin/test.c2012-08-02 08:15:05 UTC (rev 74793) @@ -183,6 +183,7 @@ void test_datetime(void *data, Evas_Object *obj, void *event_info); void test_popup(void *data, Evas_Object *obj, void *event_info); void test_dayselector(void *data, Evas_Object *obj, void *event_info); +void test_image(void *data, Evas_Object *obj, void *event_info); #ifdef HAVE_EMOTION void test_video(void *data, Evas_Object *obj, void *event_info); #endif @@ -466,6 +467,7 @@ ADD_TEST(NULL, "Images", "Photocam", test_photocam); ADD_TEST(NULL, "Images", "Photo", test_photo); ADD_TEST(NULL, "Images", "Thumb", test_thumb); + ADD_TEST(NULL, "Images", "Image", test_image); ADD_TEST(NULL, "Images", "Slideshow", test_slideshow); #ifdef HAVE_EMOTION ADD_TEST(NULL, "Images", "Video", test_video); Modified: trunk/elementary/src/lib/elm_image.c =================================================================== --- trunk/elementary/src/lib/elm_image.c2012-08-02 08:10:18 UTC (rev 74792) +++ trunk/elementary/src/lib/elm_image.c2012-08-02 08:15:05 UTC (rev 74793) @@ -473,16 +473,23 @@ { case ELM_IMAGE_FLIP_HORIZONTAL: _elm_image_flip_horizontal(sd); +sd->orient = orient; return; case ELM_IMAGE_FLIP_VERTICAL: _elm_image_flip_vertical(sd); +sd->orient = orient; return; case ELM_IMAGE_ROTATE_180: _elm_image_smart_rotate_180(sd); +sd->orient = orient; return; + case ELM_IMAGE_ORIENT_NONE: + sd->orient = orient; + return; + default: break; } @@ -491,8 +498,11 @@ /* we need separate destination memory if we want to rotate 90 or * 270 degree */ - evas_object_image_data_copy_set(sd->img, data2); + data = evas_object_image_data_get(sd->img, EINA_FALSE); + if (!data) return; + data2 = malloc(sizeof(unsigned char) * (iw * ih * 4)); if (!data2) return; + memcpy(data2, data, sizeof (unsigned char) * (iw * ih * 4)); w = ih; ih = iw; @@ -507,23 +517,27 @@ case ELM_IMAGE_FLIP_TRANSPOSE: to = data; hw = -hw + 1; +sd->orient = orient; break; case ELM_IMAGE_FLIP_TRANSVERSE: to = data + hw - 1; w = -w; hw = hw - 1; +sd->orient = orient; break; case ELM_IMAGE_ROTATE_90: to = data + w - 1; hw = -hw - 1; +sd->orient = orient; break; case ELM_IMAGE_ROTATE_270: to = data + hw - w; w = -w; hw = hw + 1; +sd->orient = orient; break; default: @@ -545,7 +559,6 @@ } to += hw; } - sd->orient = orient; if (data2) free(data2); evas_object_image_data_set(sd->img, data); ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ enlightenment-svn mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/enlightenment-svn ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ enlightenment-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
