Canvas provides a drawbitmapmesh (bitmap, Meshwidth, Meshheight, Verts, Vertoffset, colors, Coloroffset, paint) method, This method can distort the bitmap, and realize various twisting effects such as "rippling" and "wind-blown banner".
Key parameter description of the Drawbitmapmesh method:
Bitmap: Specifies the source bitmap that needs to be distorted.
Meshwidth: This parameter controls how many grids the source bitmap is divided across horizontally.
Meshheight: This parameter controls how many grids the source bitmap is divided vertically.
Verts: This parameter is an array of length (meshwidth+1) * (meshheight+1) * *, which records the distorted bitmap "vertex" position, although it is a single in the array, it actually records the data is shaped like (x0,y0), (X1,y), (x2,y )...... (XN,YN) formatted data that controls the distortion effect on the bitmap bitmap.
Vertoffset: Controls the Verts array to distort the bitmap (ignoring the distorted effect of the data before Vertoffset) from the first array elements.
Distort an image with Drawbitmapmesh