0

我使用 Nexus 7 设备

我用字体大小和字体创建画图;我的字体是“Arial”,大小是 780;我的任务是用不同的颜色写“坐”(s - 红色,它 - 蓝色)

for(int j = 0; j < subStr.get_items().size(); j++) // substr contains two elements "s" and "it"
{
    TextWord item = subStr.get_items().get(j);
    paint.setColor(item.get_textColor());
    paint.setAntiAlias(true);
    canvas.drawText(item._value, item._textRect.left, item._textRect.top + item._textRect.height(), paint);
}

在应用程序中,我只看到“s t”,但“i”不可见。可能是什么问题?画得不好 - https://dl.dropboxusercontent.com/u/35170194/Screenshot_2013-05-07-18-22-48.png 画得好 - https://dl.dropboxusercontent.com/u/35170194/Screenshot_2013-05 -07-18-22-37.png

4

1 回答 1

0

如果 _textRect 是用相同的字体大小计算的,请尝试减小用于绘制实际文本的字体大小(例如减少到 5-10%)。

于 2013-05-14T07:58:05.427 回答