7

I draw text throw TextPaint on Canvas. And in some cases it looks terible:

240*320 API 7 240*320 API 7

240*320 API 7 240*320 API 7

240*320 API 15 240*320 API 15

In some cases good:

720*1280 API 15 720*1280 API 15

I use: TextPaint paint = new TextPaint();

paint.setTextSize(height/20);

canvas.drawText("Just text", x, y, paint);

What do I wrong?

4

1 回答 1

21

antialiasing标志设置为您的Paint对象。国旗是ANTI_ALIAS_FLAG

TextPaint paint = new TextPaint(TextPaint.ANTI_ALIAS_FLAG);
于 2013-05-28T08:31:12.100 回答