假设我们有一个内半径为R2且外半径为R1的环.根据文件:
Inner radius of the ring expressed as a ratio of the ring's width.For instance, if innerRadiusRatio=9, then the inner radius equals the ring's width divided by 9
据我所知,这意味着innerRadiusRatio = 2*R1 / R2.
关于thicknessRatio有:
Thickness of the ring expressed as a ratio of the ring's width. For instance, if thicknessRatio=3, then the thickness equals the ring's width divided by 3.所以thicknessRatio = 2*R1 / (R1 - R2).
从这两个方程我们可以得到这个:thicknessRatio*(1-2/innerRadiusRatio)=2这意味着thicknessRatio和innerRadiusRatio之间存在联系.但是在GradientDrawable类文档中没有任何关于此连接的信息.并且似乎它们之间没有任何连接,因为我可以设置thicknessRatio和innerRadiusRatio,它不满足最后的等式.
请告诉我,在我考虑的地方我错了或者这个参数真正负责的是什么?