Android realizes the arc dotted line effect of gradient color
Let's first look at the renderings:
1. Sweetgradient
Scanning rendering is the effect of rotating a certain point Center for one week! The parameters are:
Cx: X coordinate of the center of the scan
Cy: the Y coordinate of the center of the scan
Colors: an array of colors for gradient gradients
Positions: Specifies the relative position of the color array
design sketch:
2. Dashpatheffect (dashed line segment of path)
Intervals: an array of on and off dashed lines. The number of elements in the array needs to be > = 2
Phase: is the offset when drawing
design sketch:
3. Here are all the codes:
summary
The above is the whole content of this article. I hope the content of this article can bring some help to your study or work. If you have any questions, you can leave a message.