What kind of connection exists between innerRadiusRatio and thicknessRatio from GradientDrawable class?

后端 未结 2 550
无人及你
无人及你 2021-02-01 10:46

Let\'s supposed we\'ve got a ring with inner radius R2 and outer radius R1. According documentation: Inner radius of the ring expressed as a ratio of the ring\'s width.For

2条回答
  •  独厮守ぢ
    2021-02-01 11:21

    Ratios are a comparison of two numbers, so the above two equations can be rewritten as

    Ratio1 = InnerRadius : Ring Width (where Ratio1 = InnerRadiusRatio)

    Ratio2 = Thickness : Ring Width (where Ratio2 = ThicknessRatio)

    Which means...

    Ring Width = Ratio1 x Inner Radius = Ratio2 x Thickness

    The "2" appeared since you added it into your equation. The only common denominator in all equation is "Ring Width". Trying it out with real numbers helps too.

提交回复
热议问题