简体   繁体   English

在android中的按钮上绘制不同的颜色

[英]Paint different colors on button in android

I have a transparent image its a circle style. 我有一个透明的图像,它是一个圆形的样式。 I want to fill multiple colors to this image.It will look like circle graph. 我想为此图像填充多种颜色。它看起来像圆形图。 example 20% red color 30% blue remaing 50% black like that. 例如20%红色30%蓝色剩余50%黑色那样。 Can any one give idea how to paint colors by using percentage. 任何人都可以提出使用百分比绘制颜色的想法。 And later that image need to rotate like phone dailer. 之后,该图像需要像电话戴德勒一样旋转。

JFreeChart can generate pie charts and can save the resultant chart to JPEG format. JFreeChart可以生成饼图,并且可以将结果图保存为JPEG格式。 Here is an example of how to do so. 这是如何执行此操作的示例 Here is a 3D example . 这是一个3D示例

There are more examples and documentation available in the developers guide. 开发人员指南中提供了更多示例和文档。

Other charting libraries which generate piecharts: 其他产生饼图的图表库:

This one is taken from here . 这是从这里拿来的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM