首页 > 安全资讯 >

绘制文字,缩小,阴影不随之缩小的处理

11-09-06

canvas.scale(zoom, zoom);TextPaint textPaint = new TextPaint();textPaint.setAntiAlias(true);DynamicLayout layout = new DynamicLayout(text, textPaint, width, Layout.Alignment.ALIGN_NORM...

canvas.scale(zoom, zoom);
TextPaint textPaint = new TextPaint();
textPaint.setAntiAlias(true);
DynamicLayout layout = new DynamicLayout(text, textPaint, width,
                            Layout.Alignment.ALIGN_NORMAL, 1.0f, 1.0f, false);
layout.draw(canvas);
注意加
 textPaint.setSubpixelText(true);

作者“技术人生”

相关文章
最新文章
热点推荐