我想在Canvas中绘画:
如何进行边界效果?感谢
答案 0 :(得分:44)
两次绘制文字。首先使用填充颜料绘制文本,如下所示:
Paint fillPaint = new Paint();
fillPaint.setColor(Color.MAGENTA);
canvas.drawText(.... fillPaint);
然后再用这样的笔画画出来:
Paint stkPaint = new Paint();
stkPaint.setStyle(Style.STROKE);
stkPaint.setStrokeWidth(8);
stkPaint.setColor(Color.WHITE);
canvas.drawText(.... stkPaint);