相关疑难解决方法(0)

GradientDrawable类的innerRadiusRatio和thicknessRatio之间存在什么样的联系?

假设我们有一个内半径为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,它不满足最后的等式.

请告诉我,在我考虑的地方我错了或者这个参数真正负责的是什么?

math android view drawable

6
推荐指数
2
解决办法
7237
查看次数

标签 统计

android ×1

drawable ×1

math ×1

view ×1