Hello.
When you test elm_map with mouse wheel, it worked abnormally because of some
bug.
So I made some more patch for fixing it.
This patch file also includes a previous patch (zoom-out issue).
My previous patch code is not reviewed from any other people except SeoZ.
:'-(
Please review again.
Thanks!
On Wed, Sep 14, 2011 at 2:33 AM, Kim Yunhan <[email protected]> wrote:
> Hello, SeoZ.
>
> I tried to re-occur symptom that you mentioned.
> But I succeeded just one time in several tries. :'-(
>
> I suspected that zoom-out need file downloading. (not zoom-in)
> And if some file transferring error is occurred, the texture can be broken.
> Actually, in my case, the console printed out 'bpng' error like below.
>
> bpng error: Read Error
> downloaded : 411 / 424
> downloaded : 412 / 424
> libpng error: Read Error
>
> I'll investigate file transfer logic in elm_map.
> And if I find something wrong, I'll debug it.
>
> Thanks!
> Yunhan Kim
>
> On Sun, Sep 11, 2011 at 10:59 PM, Daniel Juyung Seo
> <[email protected]>wrote:
>
>> Hello Yunhan,
>> This is my test environment.
>>
>> Engines:
>> Software Memory Buffer.....: yes
>> Software X11...............: yes (Xlib: yes) (XCB: no)
>> OpenGL X11.................: yes (Xlib: yes) (XCB: no) (GLES: no)
>> (SGX: no) (s3c6410: no)
>> Software GDI...............: no
>> Software DirectDraw........: no
>> Direct3d...................: no
>> Software SDL...............: no (primitive: no)
>> OpenGL SDL.................: no
>> Software Framebuffer.......: yes
>> DirectFB...................: no
>> Software 8bit grayscale....: no
>> Software 16bit ............: no
>> Software 16bit X11.........: no
>> Software 16bit Directdraw..: no
>> Software 16bit WinCE.......: no
>> Software 16bit SDL.........: no (primitive: no)
>>
>>
>> I recorded a video for you.
>> http://www.youtube.com/watch?v=nap6Qq9iGTg
>>
>> The black noise may be already there but we couldn't see before due to
>> some reasons.
>> I guess you're patch looks ok and nobody is interested in reviewing
>> elm_map patch.
>> I'll commit your code if nobody reviews in a couple of days.
>>
>> Thanks.
>> Daniel Juyung Seo (SeoZ)
>>
>>
>> On Fri, Sep 9, 2011 at 1:46 PM, Kim Yunhan <[email protected]> wrote:
>> > Hello, seoz.
>> >
>> > Wow, testing with valgrind is great idea!
>> > I did test on my computer and my device.
>> > But I couldn't see your mentioned symptom.
>> >
>> > I guess that evas_map is related with its back-end evas render engine.
>> > So, I think your render is different with mine.
>> > This is my testing environment on evas engine.
>> >
>> > Engines:
>> > Software Memory Buffer.....: yes
>> > Software X11...............: yes (Xlib: yes) (XCB: no)
>> > OpenGL X11.................: no (Xlib: no) (XCB: no)
>> > Software GDI...............: no
>> > Software DirectDraw........: no
>> > Direct3d...................: no
>> > Software SDL...............: no (primitive: no)
>> > OpenGL SDL.................: no
>> > Software Framebuffer.......: yes
>> > DirectFB...................: no
>> > Software 8bit grayscale....: no
>> > Software 16bit ............: no
>> > Software 16bit X11.........: no
>> > Software 16bit Directdraw..: no
>> > Software 16bit WinCE.......: no
>> > Software 16bit SDL.........: no (primitive: no)
>> >
>> > Could you tell me your environment?
>> > Then I'll investigate some more.
>> >
>> > Regards,
>> > Yunhan Kim
>> >
>> >
>> > On Fri, Sep 9, 2011 at 10:30 AM, Daniel Juyung Seo <
>> [email protected]>wrote:
>> >
>> >> Dear Kim Yunhan,
>> >> Thanks for you patch.
>> >>
>> >> Watchwolf and gouache can review your patch well. But I think nobody
>> >> are active now.
>> >> I just applied your patch and ran elementary_test "Map".
>> >>
>> >> I GUESS broken tile on zooming out issue is fixed. (I'm not sure we're
>> >> talking about the same issue.)
>> >> But I got noise on zooming out.
>> >> Please see this screenshot.
>> >> http://www.flickr.com/photos/67308399@N05/6128438625/
>> >>
>> >> Black noise didn't happen before.
>> >> You can easily see this when you run elementary_test with valgrind.
>> >> Because it makes things very slow :)
>> >>
>> >> Can you check this?
>> >> Thanks in advance.
>> >>
>> >> Daniel Juyung Seo (SeoZ)
>> >>
>> >>
>> >> On Thu, Sep 8, 2011 at 4:43 PM, Kim Yunhan <[email protected]> wrote:
>> >> > Is there anybody to review this patch?
>> >> > :'-(
>> >> >
>> >> > On Tue, Sep 6, 2011 at 2:41 AM, Kim Yunhan <[email protected]> wrote:
>> >> >
>> >> >>
>> >> >> Hello.
>> >> >>
>> >> >> I wrote a patch that handles a bug while zooming-out in elm_map.
>> >> >> When I try to zoom out, some tiles are broken.
>> >> >> But it is hard to notice because broken frame disappears quickly.
>> >> >>
>> >> >> I investigated in a few days.
>> >> >> And I realize that there are something wrong.
>> >> >> When map is zoomed out, a tile is shrunk by evas_object_resize().
>> >> >> But evas_map handles its texture by just its origin image size not a
>> >> shrunk
>> >> >> size.
>> >> >> If evas_object's width & height is shrunk, I have to handle for its
>> >> >> texture.
>> >> >> So, I added some code for patch.
>> >> >>
>> >> >> Please review this.
>> >> >> Thanks!
>> >> >>
>> >> >
>> >>
>> ------------------------------------------------------------------------------
>> >> > Doing More with Less: The Next Generation Virtual Desktop
>> >> > What are the key obstacles that have prevented many mid-market
>> businesses
>> >> > from deploying virtual desktops? How do next-generation virtual
>> >> desktops
>> >> > provide companies an easier-to-deploy, easier-to-manage and more
>> >> affordable
>> >> > virtual desktop model.
>> http://www.accelacomm.com/jaw/sfnl/114/51426474/
>> >> > _______________________________________________
>> >> > enlightenment-devel mailing list
>> >> > [email protected]
>> >> > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>> >> >
>> >>
>> >>
>> >>
>> ------------------------------------------------------------------------------
>> >> Why Cloud-Based Security and Archiving Make Sense
>> >> Osterman Research conducted this study that outlines how and why cloud
>> >> computing security and archiving is rapidly being adopted across the IT
>> >> space for its ease of implementation, lower cost, and increased
>> >> reliability. Learn more.
>> http://www.accelacomm.com/jaw/sfnl/114/51425301/
>> >> _______________________________________________
>> >> enlightenment-devel mailing list
>> >> [email protected]
>> >> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>> >>
>> >
>> ------------------------------------------------------------------------------
>> > Why Cloud-Based Security and Archiving Make Sense
>> > Osterman Research conducted this study that outlines how and why cloud
>> > computing security and archiving is rapidly being adopted across the IT
>> > space for its ease of implementation, lower cost, and increased
>> > reliability. Learn more.
>> http://www.accelacomm.com/jaw/sfnl/114/51425301/
>> > _______________________________________________
>> > enlightenment-devel mailing list
>> > [email protected]
>> > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>> >
>>
>>
>> ------------------------------------------------------------------------------
>> Using storage to extend the benefits of virtualization and iSCSI
>> Virtualization increases hardware utilization and delivers a new level of
>> agility. Learn what those decisions are and how to modernize your storage
>> and backup environments for virtualization.
>> http://www.accelacomm.com/jaw/sfnl/114/51434361/
>> _______________________________________________
>> enlightenment-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>>
>
>
Index: elm_map.c
===================================================================
--- elm_map.c (revision 63482)
+++ elm_map.c (working copy)
@@ -42,8 +42,8 @@
#define NOMINATIM_ATTR_LON "lon"
#define NOMINATIM_ATTR_LAT "lat"
-#define PINCH_ZOOM_MIN 0.1
-#define PINCH_ZOOM_MAX 5.0
+#define PINCH_ZOOM_MIN 0.25
+#define PINCH_ZOOM_MAX 4.0
#define GPX_NAME "name>"
#define GPX_COORDINATES "trkpt "
@@ -742,6 +742,17 @@
}
evas_map_util_points_populate_from_object_full(wd->map, obj, 0);
+ int ow, oh, iw, ih;
+ evas_object_image_size_get(obj, &iw, &ih);
+ evas_object_geometry_get(obj, NULL, NULL, &ow, &oh);
+ if (ow < iw || oh < ih)
+ {
+ ow *= (double)iw / ow;
+ oh *= (double)ih / oh;
+ evas_map_point_image_uv_set(wd->map, 1, ow, 0);
+ evas_map_point_image_uv_set(wd->map, 2, ow, oh);
+ evas_map_point_image_uv_set(wd->map, 3, 0, oh);
+ }
evas_map_util_zoom(wd->map, wd->pinch.level, wd->pinch.level, wd->pinch.cx,
wd->pinch.cy);
evas_map_util_rotate(wd->map, wd->rotate.d, wd->rotate.cx, wd->rotate.cy);
evas_object_map_enable_set(obj, EINA_TRUE);
@@ -1904,27 +1915,26 @@
half_w = (float)w * 0.5;
half_h = (float)h * 0.5;
- if (!wd->wheel_zoom) wd->wheel_zoom = 1.0;
if (ev->z > 0)
{
wd->zoom_method = ZOOM_METHOD_OUT;
- wd->wheel_zoom -= 0.05;
- if (wd->wheel_zoom <= PINCH_ZOOM_MIN) wd->wheel_zoom = PINCH_ZOOM_MIN;
+ wd->wheel_zoom -= 0.1;
+ if (wd->wheel_zoom <= -2.0) wd->wheel_zoom = -2.0;
}
else
{
wd->zoom_method = ZOOM_METHOD_IN;
- wd->wheel_zoom += 0.2;
- if (wd->wheel_zoom >= PINCH_ZOOM_MAX) wd->wheel_zoom = PINCH_ZOOM_MAX;
+ wd->wheel_zoom += 0.1;
+ if (wd->wheel_zoom >= 2.0) wd->wheel_zoom = 2.0;
}
if (!wd->paused)
{
- wd->pinch.level = wd->wheel_zoom;
- wd->pinch.cx = x + half_w;
- wd->pinch.cy = y + half_h;
- if (wd->calc_job) ecore_job_del(wd->calc_job);
- wd->calc_job = ecore_job_add(_calc_job, wd);
+ wd->pinch.level = pow(2.0, wd->wheel_zoom);
+ wd->pinch.cx = x + half_w;
+ wd->pinch.cy = y + half_h;
+ if (wd->calc_job) ecore_job_del(wd->calc_job);
+ wd->calc_job = ecore_job_add(_calc_job, wd);
}
if (wd->wheel_timer) ecore_timer_del(wd->wheel_timer);
@@ -1951,17 +1961,20 @@
int zoom;
if (!wd) return ECORE_CALLBACK_CANCEL;
- if (wd->zoom_method == ZOOM_METHOD_IN) zoom = (int)ceil(wd->wheel_zoom -
1.0);
- else if (wd->zoom_method == ZOOM_METHOD_OUT) zoom = (int)floor((-1.0 /
wd->wheel_zoom) + 1.0);
+ if (wd->zoom_method == ZOOM_METHOD_IN) zoom = (int)ceil(wd->wheel_zoom);
+ else if (wd->zoom_method == ZOOM_METHOD_OUT) zoom =
(int)floor(wd->wheel_zoom);
else
{
wd->wheel_timer = NULL;
return ECORE_CALLBACK_CANCEL;
}
+
wd->mode = ELM_MAP_ZOOM_MODE_MANUAL;
+ wd->pinch.level = 1.0;
elm_map_zoom_set(data, wd->zoom + zoom);
wd->wheel_zoom = 0.0;
wd->wheel_timer = NULL;
+ wd->zoom_method = ZOOM_METHOD_NONE;
return ECORE_CALLBACK_CANCEL;
}
@@ -2290,7 +2303,7 @@
rect_place(sd->wd->obj, sd->wd->pan_x, sd->wd->pan_y, ox, oy, ow, oh);
EINA_LIST_FOREACH(sd->wd->grids, l, g)
{
- if ((sd->wd->pinch.level == 1.0) || (sd->wd->pinch.level == 0.5))
grid_load(sd->wd->obj, g);
+ if (sd->wd->zoom == g->zoom) grid_load(sd->wd->obj, g);
grid_place(sd->wd->obj, g, sd->wd->pan_x, sd->wd->pan_y, ox, oy, ow,
oh);
marker_place(sd->wd->obj, g, sd->wd->pan_x, sd->wd->pan_y, ox, oy, ow,
oh);
if (!sd->wd->zoom_animator) route_place(sd->wd->obj, g, sd->wd->pan_x,
sd->wd->pan_y, ox, oy, ow, oh);
------------------------------------------------------------------------------
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
Learn about the latest advances in developing for the
BlackBerry® mobile platform with sessions, labs & more.
See new tools and technologies. Register for BlackBerry® DevCon today!
http://p.sf.net/sfu/rim-devcon-copy1
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel