Fix vertical offset

(cherry picked from commit cd688b4)
This commit is contained in:
Alex Sytnyk 2018-08-01 16:39:45 +03:00
parent c6d47c2f3f
commit e654d02241

View file

@ -173,8 +173,7 @@ public class AidlMapLayer extends OsmandMapLayer implements IContextMenuProvider
canvas.drawBitmap(image, null, getDstRect(x, y, smallIconSize / 2), bitmapPaint); canvas.drawBitmap(image, null, getDstRect(x, y, smallIconSize / 2), bitmapPaint);
} else if (pointsType == PointsType.BIG_ICON) { } else if (pointsType == PointsType.BIG_ICON) {
bitmapPaint.setColorFilter(null); bitmapPaint.setColorFilter(null);
// FIXME: vertical offset float vOffset = bigIconBg.getHeight() * 0.91f;
float vOffset = bigIconBg.getHeight() * 0.9f;
int imageCenterY = (int) (y - vOffset + bigIconBg.getHeight() / 2); int imageCenterY = (int) (y - vOffset + bigIconBg.getHeight() / 2);
canvas.drawBitmap(bigIconBg, x - bigIconBg.getWidth() / 2, y - vOffset, bitmapPaint); canvas.drawBitmap(bigIconBg, x - bigIconBg.getWidth() / 2, y - vOffset, bitmapPaint);
canvas.drawBitmap(image, null, getDstRect(x, imageCenterY, bigIconSize / 2), bitmapPaint); canvas.drawBitmap(image, null, getDstRect(x, imageCenterY, bigIconSize / 2), bitmapPaint);