如何绘制文本diferent笔触和填充颜色使用Java的Andr​​oid [英] How to draw text with diferent stroke and fill colors in android using java

查看:168
本文介绍了如何绘制文本diferent笔触和填充颜色使用Java的Andr​​oid的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的应用程序,如下显示的文字。我使用的风格FILL_AND_STROKE油漆类来实现这一点。但是,只有一个方法 setColor 可设置颜色。如何设置不同的笔触和填充颜色?

I want to display text as below in my app. I am using Paint class with style FILL_AND_STROKE to achieve this. But only one method setColor is available to set color. How to set different stroke and fill colors ?

请帮我对此。

推荐答案

不要使用FILL_AND_STROKE。与FILL绘制,然后改变颜色,并绘制与中风。

Don't use FILL_AND_STROKE. Draw once with FILL and then change the color and draw with STROKE.

(该工程为矩形。我不知道中风的作品在所有的文字,你必须尝试和找出来。)

(That works for rectangles. I'm not sure STROKE works at all for text. You'll have to try it and find out.)

这篇关于如何绘制文本diferent笔触和填充颜色使用Java的Andr​​oid的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆