It must do the same with the line bar, start center.
Can't you try out something by yourself?
Here are some hints:
The function has the following parameters
display.fillRect( startX, [color=red]startY[/color], width, [color=red]height[/color], Color );
startX and width are known (0 and 5), Color is known (White).
So you need to calculate the startY point and the height of bar
You know you want one side to be center (you know which Y that is) and that newBarY is where the other side should be (just mind that it can be above or below the center if your library does not know how to draw a rectangle with negative height).
it is not rocket science to figure that out. give it a try
Yes of course i want to try things myself.
That is the way i am learning, but i need to get a push in the direction of what i want.
And i always look back into the code and try to understand the code.
Its not like some one puts a code here and copy pas en then do nothing anymore.
Now if the caliper is 2.10 it wont center.
But when i go above 2.10 i have a full bar on the upper half.
And when i go under 2.10 i have a full bar at the bottom half.
i understand that you can change the size of the bar.
if (newBarY > 32) {
// BELOW CENTER
startY = 32;
height = 64;
} else {
// ABOVE CENTER
startY = 0;
height = 32;
}
The bar is now only go up and down full.
Can y use Y++ to let the bar move like it did with the line bar?
The man needs a fish. You have plenty, so that's fine.
Teach the man to fish. But with no license, that's a crime.
Discover that he's vegan. You've wasted all your time.
J-M-L i will stile try your lesson that you gave me , then i am learning.
De bar works, and i will read the code and try to understand how the code is working.