From: Varun Date: Wed, 7 Dec 2016 00:06:58 +0000 (-0500) Subject: Flip marker bitmap image X-Git-Tag: accepted/tizen/common/20161207.184448^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=351ddd68f462e6188f70d1f640acf631fb04a544;p=platform%2Fcore%2Flocation%2Fmaps-plugin-mapzen.git Flip marker bitmap image In accordance with core tangram changes, its required to flip bitmap image. Change-Id: Ia1fc636c814567bd0ad8aa6b770dc9b089b5cf10 --- diff --git a/src/mapzen/tangram_view.cpp b/src/mapzen/tangram_view.cpp index 5aa690d..fd09ffd 100644 --- a/src/mapzen/tangram_view.cpp +++ b/src/mapzen/tangram_view.cpp @@ -605,6 +605,19 @@ mapzen_error_e TangramView::getBitmapMarkerImage(maps_view_object_h object, unsi *(imgData + offset + 3) = *(srcData + offset + 3); } } + + // flip converted image + unsigned int *flippedImg = (unsigned int*)imgData; + unsigned int temp; + for (int i = 0; i < (imgHeight>>1); i++) { + unsigned int* lower = flippedImg + (i * imgWidth); + unsigned int* upper = flippedImg + ((imgHeight - i - 1) * imgWidth); + for (int j = 0; j < imgWidth; j++) { + temp = lower[j]; + lower[j] = upper[j]; + upper[j] = temp; + } + } } while (0); return (mapzen_error_e)convert_maps_error_to_mapzen_error(error);