Good day .
Ask pros - have battery widget that consists of two Rastova images. The first of which is the face , the second is an arrow charge level ( screenshot attached).
Widget code , ie Additional features of the arrow bitmap vygdyadit so: [as]$(320/107*# BLEVN#)$[/ as]
[ar]0[/ ar]
[r]$(320/107*#BLEVN#)$[/ r].
I understand that 320 is the value in degrees, ie Dial size from 0 to 100 ( the charge ) . With the rest of the parameters is also understandable .
But I can not understand how to calculate the parameter 107. It is responsible for the correct display of the arrow charge level , and strictly tied to the scale of the dial , the display of the correct scale.
Question - I just wanted to do this:
Scale battery is an arc , arc start taking if taken as 0 degrees axis Y, then 10 degrees , respectively ends , if you go to watch the X-axis of 80 degrees . That is, the total arc of 70 degrees is obtained . under the arc is a numeric value and a battery level . Willing to that for the digital value of 100 % was 80 degrees at 0 degrees of 10 % , respectively, and when the charge level value moves in an arc of from 80 degrees to 10 degrees.
Starting from the above example
[as]$(320/107*#BLEVN#)$[/ as]
[ar]0[/ ar]
[r]$(320/107*#BLEVN#)$[/ r]
then I should get the expression [as]$(70/???*#BLEVN#)$[/ as]
Considering that the scale ends at 80 degrees can be assumed that in a mathematical form , when the charge level is 100 % , the expression should look like equation
70 / X (unknown ) * 100 = 80 , then X conform is found to be 87.5 . It would seem that all figured out, but that's the trouble with the level of charge in the 100% value rises to 80 degrees , but at a value of 0% rises to 0 degrees instead of 10 degrees. and how to fix it , I do not know.
That's basically all for now , so I think , and forward who can tell that.
Sincerely, Anatoliy!
Ask pros - have battery widget that consists of two Rastova images. The first of which is the face , the second is an arrow charge level ( screenshot attached).
Widget code , ie Additional features of the arrow bitmap vygdyadit so: [as]$(320/107*# BLEVN#)$[/ as]
[ar]0[/ ar]
[r]$(320/107*#BLEVN#)$[/ r].
I understand that 320 is the value in degrees, ie Dial size from 0 to 100 ( the charge ) . With the rest of the parameters is also understandable .
But I can not understand how to calculate the parameter 107. It is responsible for the correct display of the arrow charge level , and strictly tied to the scale of the dial , the display of the correct scale.
Question - I just wanted to do this:
Scale battery is an arc , arc start taking if taken as 0 degrees axis Y, then 10 degrees , respectively ends , if you go to watch the X-axis of 80 degrees . That is, the total arc of 70 degrees is obtained . under the arc is a numeric value and a battery level . Willing to that for the digital value of 100 % was 80 degrees at 0 degrees of 10 % , respectively, and when the charge level value moves in an arc of from 80 degrees to 10 degrees.
Starting from the above example
[as]$(320/107*#BLEVN#)$[/ as]
[ar]0[/ ar]
[r]$(320/107*#BLEVN#)$[/ r]
then I should get the expression [as]$(70/???*#BLEVN#)$[/ as]
Considering that the scale ends at 80 degrees can be assumed that in a mathematical form , when the charge level is 100 % , the expression should look like equation
70 / X (unknown ) * 100 = 80 , then X conform is found to be 87.5 . It would seem that all figured out, but that's the trouble with the level of charge in the 100% value rises to 80 degrees , but at a value of 0% rises to 0 degrees instead of 10 degrees. and how to fix it , I do not know.
That's basically all for now , so I think , and forward who can tell that.
Sincerely, Anatoliy!
Last edited: