Fix rendering

This commit is contained in:
Victor Shcherb 2014-09-23 23:10:39 +02:00
parent 0b89a61d23
commit 5c21ea5ce7

View file

@ -254,7 +254,7 @@ public class TextRenderer {
Bitmap ico = RenderingIcons.getIcon(context, text.shieldRes); Bitmap ico = RenderingIcons.getIcon(context, text.shieldRes);
if (ico != null) { if (ico != null) {
float left = text.centerX - ico.getWidth() / 2 * coef - 0.5f; float left = text.centerX - ico.getWidth() / 2 * coef - 0.5f;
float top = text.centerY - ico.getHeight() / 2 * coef - rc.getDensityValue(4.5f); float top = text.centerY - ico.getHeight() / 2 * coef - paintText.descent() - 0.5f;
if(rc.screenDensityRatio != 1f){ if(rc.screenDensityRatio != 1f){
RectF rf = new RectF(left, top, left + ico.getWidth() * coef, RectF rf = new RectF(left, top, left + ico.getWidth() * coef,
top + ico.getHeight() * coef); top + ico.getHeight() * coef);