-
Notifications
You must be signed in to change notification settings - Fork 264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
上下两行设置渐变色 #41
Comments
设置线性渐变(LinearGradient) |
Shader shaderTopText = new LinearGradient(0, 0, 0, 20, Color.parseColor("#2f3036"), Color.parseColor("#56575b"), Shader.TileMode.CLAMP); 我设置了, 可是第一行和第三行文字是用同一个paint绘制的所以. |
你试试先保存下画布: |
可以在remeasure中设置文字渐变色,通过callback可以设置,类似 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
大神, 想问一下, 就是上下两行的字体绘制时颜色如何才能分开设置呀.
现在代码中上下两行字体的颜色是通过一个paint设置的.
我现在想设置一个渐变色.就是: 第一行是从黑到灰渐变. 第三行是从灰到黑渐变.
不知道要如何改.
望大神解答!
谢谢.
The text was updated successfully, but these errors were encountered: