Declared as:
void Android.graphics.Path.arcTo (RECTF oval, float startangle, float sweepangle);
The method is to draw an arc of the path.
The first parameter is a RECTF type. What is this parameter?
First of all, how does this arc come from? It is to draw an ellipse first and then intercept part of the shape above the ellipse. This graph is naturally an arc. So how does this ellipse work? This is what this RECTF parameter does.
As shown in the figure:
Given this rectangle, the system can work out the center of the rectangle and then draw an ellipse with the center of the moment.
After you get this ellipse, then you intercept a portion of the line, and you get the final arc. How is this part intercepted?
This is the following two parameters to express together.
StartAngle This argument is about the starting angle. This is a good understanding, but where is the 0 degree, and in which direction rotation is the positive angle number? The following graphic shows:
The red line shown on the figure is 0 degrees.
StartAngle is the beginning of the degree, what is the sweepangle?
Sweepangle refers to the degree of rotation, that is, starting with startangle, how many degrees of rotation, if the sweepangle is a positive number, it is clockwise rotation, if the negative number is in the counterclockwise direction of rotation.
If the example: startangle = 0; When sweepangle=90:
The arc of the red part is the final arc ...