Fix issue rendering names

This commit is contained in:
Victor Shcherb 2012-05-27 21:11:16 +02:00
parent b9cb4c4740
commit 7c4ffa0023
2 changed files with 2 additions and 3 deletions

View file

@ -26,7 +26,6 @@ import android.graphics.PointF;
import android.graphics.Rect;
import android.graphics.RectF;
import android.graphics.Typeface;
import android.text.TextPaint;
import android.util.FloatMath;
public class TextRenderer {
@ -284,7 +283,7 @@ public class TextRenderer {
}
pos++;
}
if (lastSpace == -1) {
if (lastSpace == -1 || pos == end) {
drawTextOnCanvas(cv, text.text.substring(start, pos), text.centerX, text.centerY + line * (textSize + 2), paintText,
text.textShadow);
start = pos;

View file

@ -253,7 +253,7 @@ public class POIMapLayer extends OsmandMapLayer implements ContextMenuLayer.ICon
}
pos++;
}
if(lastSpace == -1){
if(lastSpace == -1 || (pos == end)){
drawShadowText(cv, text.substring(start, pos), x, y + line * (textSize + 2));
start = pos;
} else {