【问题标题】:Weird issue with android drawing. Some chars mistically disappearandroid绘图的奇怪问题。一些字符神秘地消失了
【发布时间】:2013-05-07 15:31:02
【问题描述】:

我使用 Nexus 7 设备

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

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

【问题讨论】:

    标签: android drawing invisible chars


    【解决方案1】:

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

    【讨论】:

    • 你是我的英雄!非常感谢! =)
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-10-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-11-01
    相关资源
    最近更新 更多