From: chanywa Date: Thu, 22 Sep 2016 02:38:43 +0000 (+0900) Subject: Support that marker size is changed proportionally when the sizes are set with 0 X-Git-Tag: submit/tizen/20160928.024352~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=06b5090ec5f844fe3468db464ba38d8103e2a906;p=platform%2Fcore%2Flocation%2Fmaps-plugin-here.git Support that marker size is changed proportionally when the sizes are set with 0 Change-Id: Ia37d3a1f31aa4be3a513ff50e43c43b95ec47952 --- diff --git a/src/here_view_objects.cpp b/src/here_view_objects.cpp index 8a73a29..b41eace 100644 --- a/src/here_view_objects.cpp +++ b/src/here_view_objects.cpp @@ -521,6 +521,12 @@ bool HereViewObjects::__resizeMarker(maps_view_object_h hMarker, int resizedWidth = 0, resizedHeight = 0; maps_view_object_marker_get_size(hMarker, &resizedWidth, &resizedHeight); + /* Set the size proportionally if one of new sizes is zero. */ + if (resizedWidth == 0 && resizedHeight > 0) + resizedWidth = resizedHeight * (originWidth / originHeight); + else if (resizedHeight == 0 && resizedWidth > 0) + resizedHeight = resizedWidth * (originHeight / originWidth); + if (__resizeBitmap(bitmap, originWidth, originHeight, resizedWidth, resizedHeight)) { *newWidth = resizedWidth; *newHeight = resizedHeight;