Summary:
The strech region has paired information; total and strechable.
Refer to function _strech_region_load retrieving strech region info.
But if 9-patch information line ends with strechable,
png did not push the strechable information.
And it leads to devide by zero.
This patch is adding strechable info to the strech region,
if 9-patch information ends with strechable.
Test Plan:
[Code]
{
F4219278}
{
F4219280}
[Test]
ECORE_EVAS_ENGINE=opengl_x11 ./evas-image-9patch ./end_with_strech.9.png
Reviewers: Hermet, jsuya, herb, cedric
Reviewed By: Hermet
Subscribers: #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12204
Change-Id: I6242b2686358c28e2efbb152d40e59a898ee435d
evas_loader_helper_stretch_region_push(&prop->stretch.horizontal.region,
¤t, stretchable);
}
+ // End with strechable, add length info
+ if (stretchable)
+ {
+ evas_loader_helper_stretch_region_push(&prop->stretch.horizontal.region,
+ ¤t, stretchable);
+ stretchable = !stretchable;
+ }
current = 0;
evas_loader_helper_stretch_region_push(&prop->stretch.vertical.region,
¤t, stretchable);
}
+ // End with strechable, add length info
+ if (stretchable)
+ {
+ evas_loader_helper_stretch_region_push(&prop->stretch.vertical.region,
+ ¤t, stretchable);
+ stretchable = !stretchable;
+ }
// Content zone is optional, if not provided, we should use the one we guessed
if (prop->content.x == 0 || prop->content.y == 0)